discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: everything works perfectly now!


From: George Edwards
Subject: Re: everything works perfectly now!
Date: Tue, 25 Aug 2020 09:35:58 -0600

Hi Martin, I forget to add the "install" after sudo make. My mistake! George

On Tue, Aug 25, 2020, 9:05 AM George Edwards <gedwards.eng@gmail.com> wrote:
Hi Martin, I got it working and the seven QA tests runs fine. The problem now is that, it is not building the Gnuradio block, which I find strange. Any suggestions? George

On Mon, Aug 24, 2020, 9:50 PM George Edwards <gedwards.eng@gmail.com> wrote:
Hi Martin,

We communicated recently on my ongoing difficulty trying to write a stand alone C++ method that is called within the general_work method. Below is a snapshot of how I try to wrap my stand alone method into the Gnuradio. It compiles, however, when I run the QA, it fails and throws the message which I cut and pasted below. I greatly appreciate any further insight you can share with me towards a solution.

   #ifdef HAVE_CONFIG_H

    #include "config.h"

    #endif

 

    #include <gnuradio/io_signature.h>

    #include "constel_mod_v2_bc_impl.h"

 

    namespace gr {

      namespace tutorial {

           gr_complex

           constel_mod_v2_bc_impl::my_constel_ptr( const unsigned char &sample, int d_mod_type)

           {

         // Body of My method goes here

           }

      } /* namespace tutorial */

} /* namespace gr */

 

The message returned during QA run:

Traceback (most recent call last):

  File "/home/gnuradio/Documents/Edwards/gr-tutorial/build/swig/tutorial_swig.py", line 14, in swig_import_helper

    return importlib.import_module(mname)

  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module

    return _bootstrap._gcd_import(name[level:], package, level)

  File "<frozen importlib._bootstrap>", line 994, in _gcd_import

  File "<frozen importlib._bootstrap>", line 971, in _find_and_load

  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked

  File "<frozen importlib._bootstrap>", line 658, in _load_unlocked

  File "<frozen importlib._bootstrap>", line 571, in module_from_spec

  File "<frozen importlib._bootstrap_external>", line 922, in create_module

  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed

ImportError: /home/gnuradio/Documents/Edwards/gr-tutorial/build/lib/libgnuradio-tutorial.so.1.0.0git: undefined symbol: _ZN2gr8tutorial22constel_mod_v2_bc_impl10get_mod_ptERKh

 

During handling of the above exception, another exception occurred:

 

Traceback (most recent call last):

  File "../../python/qa_constel_mod_v2_bc.py", line 24, in <module>

    import tutorial_swig as tutorial

  File "/home/gnuradio/Documents/Edwards/gr-tutorial/build/swig/tutorial_swig.py", line 17, in <module>

    _tutorial_swig = swig_import_helper()

  File "/home/gnuradio/Documents/Edwards/gr-tutorial/build/swig/tutorial_swig.py", line 16, in swig_import_helper

    return importlib.import_module('_tutorial_swig')

  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module

    return _bootstrap._gcd_import(name[level:], package, level)

ImportError: /home/gnuradio/Documents/Edwards/gr-tutorial/build/lib/libgnuradio-tutorial.so.1.0.0git: undefined symbol: _ZN2gr8tutorial22constel_mod_v2_bc_impl10get_mod_ptERKh


Thanks for your assistance.


Regards,

George


On Thu, Aug 20, 2020 at 7:10 AM Martin Braun <martin.braun@ettus.com> wrote:
George,

all the usual linking and compilation rules of C++ apply. There are plenty of blocks that call other functions from general_work() or work(). If you're compiling a-OK, then you're probably halfway there. Your QA code should tell you what's missing, if it's a missing symbol (i.e. linker error) or something more profane.

--M

On Thu, Aug 20, 2020 at 5:56 AM George Edwards <gedwards.eng@gmail.com> wrote:
Hello,

I am experimenting with writing an OOT method in a separate .cc file to be called by the general_work method that Gnuradio automatically generates when one uses the gr_modtool to create an OOT module. In general if the method is short, it is convenient to write its definition about the general_work method which called it. However, if the signal processing makes the method long with too many lines of code, then it is better to create a separate .cc file for the function. I made the additional .cc file and wrapped the method in a similar manner to how the gr_modtool  wraps the .cc file My_ProgramName.cc. The new .cc file shows no errors and I compiled the entire OOT module with: cmake ../ and make. However, when I run the QA test, it breaks the  system. Below is a template showing how I wrote the additional file named, my_function_name.cc:

#include <gnuradio/io_signature.h> 
#include "My_ProgramName.h"      // created by gr_modtool
namespace gr {
namespace tutorial {
gr_complex
 My_ProgramName_impl::my_function_name(param)
       {
       // my signal processing algorithm goes here
        }
   }  //namespace tutorial
}     //namespace gr

I will appreciate your feedback or help, so I can get my method to work and not break the system when I run the QA test.

Thank you!

George

reply via email to

[Prev in Thread] Current Thread [Next in Thread]