discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] can't compile C++ example


From: Gong Zhang
Subject: Re: [Discuss-gnuradio] can't compile C++ example
Date: Wed, 15 May 2013 10:53:43 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130328 Thunderbird/17.0.5

于 2013/5/15 0:50, Tom Rondeau 写道:
On Tue, May 14, 2013 at 2:08 PM, Gong Zhang <address@hidden> wrote:
Hi,
    I wanna execute the dial_tone.cc example.So I execute "g++ dial_tone.cc
-I /usr/local/include/gnuradio/"
    But I got the errors:
laptop:~/Desktop/ccompile$ g++ dial_tone.cc -I /usr/local/include/gnuradio/
/tmp/ccxAFik0.o: In function `main':
dial_tone.cc:(.text+0x59): undefined reference to
`gr_make_top_block(std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&)'
dial_tone.cc:(.text+0xc2): undefined reference to
`gr_make_sig_source_f(double, gr_waveform_t, double, double, float)'
dial_tone.cc:(.text+0xfb): undefined reference to
`gr_make_sig_source_f(double, gr_waveform_t, double, double, float)'
dial_tone.cc:(.text+0x176): undefined reference to `audio_make_sink(int,
std::basic_string<char, std::char_traits<char>, std::allocator<char> >,
bool)'
dial_tone.cc:(.text+0x238): undefined reference to
`gr_hier_block2::connect(boost::shared_ptr<gr_basic_block>, int,
boost::shared_ptr<gr_basic_block>, int)'
dial_tone.cc:(.text+0x2de): undefined reference to
`gr_hier_block2::connect(boost::shared_ptr<gr_basic_block>, int,
boost::shared_ptr<gr_basic_block>, int)'
dial_tone.cc:(.text+0x33d): undefined reference to `gr_top_block::run(int)'
collect2: ld returned 1 exit status
You should able to just build it running 'make' in the build
directory, not have to use your own g++ command line. Cmake should set
up the Makefile for the correct includes, linkings, flags, etc. It
should just be built when you built the rest of GNU Radio, anyways.

Tom

Does it mean I should add CMakeList for my .cc example? Can I compile the example through g++ command line?



reply via email to

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