discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Undefined reference gr::blocks::count_bits8


From: Antonis Tzougkarakis
Subject: Re: [Discuss-gnuradio] Undefined reference gr::blocks::count_bits8
Date: Tue, 27 Jun 2017 11:06:53 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0

Hello Ron,

Thank you very much for your response. The solution you provided actually solve my problem.

Thanks
Antonis


On 06/27/2017 01:00 AM, Ron Economos wrote:

You have to add BLOCKS in addition to RUNTIME. That is, change the existing line:

set(GR_REQUIRED_COMPONENTS RUNTIME)

to:

set(GR_REQUIRED_COMPONENTS RUNTIME BLOCKS)

Ron


On 06/26/2017 02:46 PM, Antonis Tzougkarakis wrote:

Hello Marcus,

I have added this in my main cmake: set(GR_REQUIRED_COMPONENTS BLOCKS). Although, when I tried to compile it I got the following message:

Swig source
/home/tzugarak/git/gr-ieee802_15_4g_testing/swig/ieee802_15_4g_testing_swig.i:5: Error: Unable to find 'gnuradio.i'
swig/CMakeFiles/ieee802_15_4g_testing_swig_swig_2d0df.dir/build.make:114: recipe for target 'swig/ieee802_15_4g_testing_swig_swig_2d0df' failed
make[2]: *** [swig/ieee802_15_4g_testing_swig_swig_2d0df] Error 1
make[2]: *** Deleting file 'swig/ieee802_15_4g_testing_swig_swig_2d0df'
CMakeFiles/Makefile2:345: recipe for target 'swig/CMakeFiles/ieee802_15_4g_testing_swig_swig_2d0df.dir/all' failed
make[1]: *** [swig/CMakeFiles/ieee802_15_4g_testing_swig_swig_2d0df.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 60%] Linking CXX shared library libgnuradio-ieee802_15_4g_testing-1.0.0git.so
[ 60%] Built target gnuradio-ieee802_15_4g_testing
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

I would also want to mention that before my addition of the function gr::blocks::count_bits8 I had no problem at all with the compile process. Do you have any idea on how to fix this?

Thanks again.
Antonis


On 06/26/2017 11:26 PM, Marcus Müller wrote:

Hello Tzougkarakis,

do you also link against gr-blocks? It's probably sufficient to add "BLOCKS" to GR_REQUIRED_COMPONENTS in your OOT's main CMakeLists.txt.

Best regards,

Marcus


On 26.06.2017 21:21, Tzougkarakis Antonis wrote:
Hello,

I have an OOT module which I have created with gr_modtool and I want to use the function count_bits_8  and count_bits_16 from gnuradio/blocks/count_bits.h. I have included the library in my c++ file but when I try to compile it I get the following message:

[ 80%] Linking CXX executable test-ieee802_15_4g_testing
libgnuradio-ieee802_15_4g_testing-1.0.0git.so.0.0.0: undefined reference to `gr::blocks::count_bits8(unsigned int)'
libgnuradio-ieee802_15_4g_testing-1.0.0git.so.0.0.0: undefined reference to `gr::blocks::count_bits16(unsigned int)'
collect2: error: ld returned 1 exit status
lib/CMakeFiles/test-ieee802_15_4g_testing.dir/build.make:130: recipe for target 'lib/test-ieee802_15_4g_testing' failed
make[2]: *** [lib/test-ieee802_15_4g_testing] Error 1
CMakeFiles/Makefile2:137: recipe for target 'lib/CMakeFiles/test-ieee802_15_4g_testing.dir/all' failed
make[1]: *** [lib/CMakeFiles/test-ieee802_15_4g_testing.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 80%] Built target ieee802_15_4g_testing_swig_swig_2d0df
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

I know that it is a link error but I don't know what addition I should do in order to fix the error. Any help would be appreciated.

Thank you.


_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio



_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio



_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio



_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


reply via email to

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