Boost logo

Boost Users :

Subject: Re: [Boost-users] Many undefined references for libboost_filesystem
From: Chris Glover (c.d.glover_at_[hidden])
Date: 2017-10-16 23:53:31


On Mon, 16 Oct 2017 at 14:58 mahmood n via Boost-users <
boost-users_at_[hidden]> wrote:

*mahmood_at_vb:ispass2009-benchmarks$* grep BOOST Makefile.ispass-2009
> export BOOST_LIB=/home/mahmood/boost_1_54_0/stage/lib; \
> export BOOST_ROOT=/home/mahmood/boost_1_54_0; \
> export BOOST_VER=""; \
> *mahmood_at_vb:ispass2009-benchmarks$* grep boost AES/Makefile
> LINKFLAGS := -L$(BOOST_LIB) -lboost_system
> -lboost_filesystem$(BOOST_VER)
> *mahmood_at_vb:ispass2009-benchmarks$* make -f Makefile.ispass-2009
> rm -f ../common; ln -s /home/mahmood/NVIDIA_GPU_Computing_SDK/C/common
> ../common;
> export
> BINDIR=/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/bin;
> export ROOTDIR=/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src/; export
> BINSUBDIR=release; export BOOST_LIB=/home/mahmood/boost_1_54_0/stage/lib;
> export BOOST_ROOT=/home/mahmood/boost_1_54_0; export BOOST_VER=""; export
> OPENMPI_BINDIR=/usr/bin/; make noinline=0 -C AES
>
>
> make[1]: Entering directory
> `/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/AES'
> obj/x86_64/release/aescuda.cpp.o: In function `_GLOBAL__sub_I_aescuda.cpp':
> aescuda.cpp:(.text.startup+0x68b): undefined reference to
> `boost::system::get_system_category()'
> aescuda.cpp:(.text.startup+0x697): undefined reference to
> `boost::system::get_generic_category()'
> aescuda.cpp:(.text.startup+0x6a3): undefined reference to
> `boost::system::get_generic_category()'
> aescuda.cpp:(.text.startup+0x6af): undefined reference to
> `boost::system::get_generic_category()'
> aescuda.cpp:(.text.startup+0x6bb): undefined reference to
> `boost::system::get_system_category()'
>
The error is in an undefined reference to a symbol in boost.system. Because
of the way GCC links, the order matters as anything not referenced up to
that point is removed.

Try changing this line:

LINKFLAGS := -L$(BOOST_LIB) -lboost_system
-lboost_filesystem$(BOOST_VER)

To

 LINKFLAGS := -L$(BOOST_LIB) -lboost_filesystem$(BOOST_VER)
-lboost_system

IE: Switch the order of system and filesystem.

Hope this helps,

-- chris



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net