Hello,
I am having trouble when linking Boost::Program_Options statically on
Linux ARM 32-bit: it spits an error about a duplicate symbol for a
guard-variable.
It works fine on Linux ARM 32-bit (same compiler) if using shared
libraries, and also on Linux x86-64 both with static and shared
libraries.
I can reproduce the problem with the examples included in the
libs/program_options/examples: real.cpp and custom_syntax.cpp compile
and run fine but first.cpp, multiple_sources.cpp
options_description.cpp, option_groups.cpp and regex.cpp fail:
$ armv7a-openelec-linux-gnueabi-g++ -std=c++11 -o option_groups
option_groups.cpp -L $SYSROOT/usr/lib -lboost_program_options
/tmp/cch3i9Yf.ltrans0.ltrans.o:(.bss._ZGVZN5boost15program_options10validators17get_single_stringIcEERKSbIT_St11char_traitsIS3_ESaIS3_EERKSt6vectorIS7_SaIS7_EEbE5empty[_ZGVZN5boost15program_options10validators17get_single_stringIcEERKSbI
T_St11char_traitsIS3_ESaIS3_EERKSt6vectorIS7_SaIS7_EEbE5empty]+0x0):
multiple definition of `guard variable for std::basic_string , std::allocator collect2: error: ld returned 1 exit status Compiling Boost with or without C++11 does not affect either (it
happens on both cases).
Has anyone faced something like this?
Thank you
--
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)