|
From: | Jim Melton |
Subject: | RE: Creating my own Random Source |
Date: | Mon, 8 Nov 2021 22:28:48 +0000 |
Probably you’ve fallen prey to the common academic practice of including “using namespace std” in your code. In industry, it’s not as common (I don’t allow it
in my projects). std::byte is a new type in C++17. If you aren’t using that new of a
compiler (or didn’t set the required standard in your CMakeLists.txt file), it won’t be supported. Try replacing
byte with std::byte and never ever write “using namespace std” ever again. If that doesn’t work, make sure you enabled C++17 (see https://crascit.com/2015/03/28/enabling-cxx11-in-cmake/). --- Jim Melton
From: Discuss-gnuradio <discuss-gnuradio-bounces+jim.melton=sncorp.com@gnu.org>
On Behalf Of Mario Moran Good afternoon, I know there is already a Random Source, but my advisor would like me to create my own out of tree modules and use them in a flowgraph. So, I am creating my own block, here are my steps so everyone can see what
I have done. gr_modtool newmod Random gr_modtool add my_Random_Byte_Source Block Type: Source Language: Cpp No arguments(Side note I might redo this and make arguments but for now it will be specific for one need) Add python QA code: n Add C++ QA code: y I then opened the my_Random_Byte_Source_impl.cc file and added: #include <gnuradio/random.h> /* unsigned byte int Then in the yml file I changed it up to be: id: Random_my_Random_Byte_Source Now, I created the build directory and used cmake -DCMAKE_INSTALL_PREFIX=/home/mariom/prefix-3.8/ .. and it was able to complete this but it failed the make install. Here is the error: /home/mariom/gr-Random/lib/my_Random_Byte_Source_impl.cc: In constructor ‘gr::Random::my_Random_Byte_Source_impl::my_Random_Byte_Source_impl()’: So, I know it doesn't like byte but I'm not sure why. I know when I did the tutorial I did gr_complex and I thought gr_byte would work but it did not so I tried the byte by itself but it still did not work. So,
I imagine that the problem is there but is there anything I did wrong? How can I fix this? Please and thank you for your help everyone. P.S. I am using ubuntu 20.04, gnuradio 3.8.4.0, and I installed it using pybombs which is why I used cmake -DCMAKE_INTSALL_PREFIX=/home/mariom/prefix-3.8/ ..
CONFIDENTIALITY NOTICE - SNC EMAIL: This email and any attachments are confidential, may contain proprietary, protected, or export controlled information, and are intended for the use of the intended recipients only. Any review, reliance, distribution, disclosure, or forwarding of this email and/or attachments outside of Sierra Nevada Corporation (SNC) without express written approval of the sender, except to the extent required to further properly approved SNC business purposes, is strictly prohibited. If you are not the intended recipient of this email, please notify the sender immediately, and delete all copies without reading, printing, or saving in any manner. --- Thank You.
|
[Prev in Thread] | Current Thread | [Next in Thread] |