discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Linking Boost Libraries


From: Jeffrey Grasty
Subject: Re: [Discuss-gnuradio] Linking Boost Libraries
Date: Sat, 26 Jan 2013 20:08:40 +0000

Hi Josh,

Thanks!  That worked.

Jeff

On Fri, Jan 25, 2013 at 11:14 PM, Josh Blum <address@hidden> wrote:


On 01/25/2013 05:12 PM, Jeffrey Grasty wrote:
> Hi,
>
> I am trying to measure the execution time of a for loop in a block and am
> trying to use boost::chrono class to do it.  However, when I build the
> block I get:
>
> Scanning dependencies of target gnuradio-modtest
> [  5%] Building CXX object
> lib/CMakeFiles/gnuradio-modtest.dir/passthrough_impl.cc.o
> Linking CXX shared library libgnuradio-modtest.dylib
> Undefined symbols for architecture x86_64:
>   "boost::chrono::steady_clock::now()", referenced from:
>       virtual thunk to gr::modtest::passthrough_impl::work(int,
> std::vector<void const*, std::allocator<void const*> >&, std::vector<void*,
> std::allocator<void*> >&)in passthrough_impl.cc.o
>       gr::modtest::passthrough_impl::work(int, std::vector<void const*,
> std::allocator<void const*> >&, std::vector<void*, std::allocator<void*>
>> &)in passthrough_impl.cc.o
> ld: symbol(s) not found for architecture x86_64
> collect2: ld returned 1 exit status
> make[2]: *** [lib/libgnuradio-modtest.dylib] Error 1
> make[1]: *** [lib/CMakeFiles/gnuradio-modtest.dir/all] Error 2
> make: *** [all] Error 2
>
> I am assuming it is because I need to tell cmake to link against
> libboost_chrono?  In my CMakeCache.txt, the boost library paths are set to
> the correct locations:
>
> //Path to a file.
> Boost_INCLUDE_DIR:PATH=/opt/local/include
>
> //Boost library directory
> Boost_LIBRARY_DIRS:FILEPATH=/opt/local/lib
>
> How do I tell cmake to link against libbboost_chrono?

Look for the find_package(Boost... line. There is a list of required
libraries, you should add chrono to this list.

-josh

>
> Tahnks,
> Jeff
>
>
>
> _______________________________________________
> 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]