Boost linking on Linux with GCC - c++

I'm trying to compile a C++ program under Ubuntu 11.10 using boost 1.42 installed from the repository (I also tried building boost myself, but the result is the same as with the repo-boost). The source files compile but the linker gives errors... I tried for hours but couldn't find a solution to this, maybe someone can help me...
Here's the target from the Makefile
CXX = /usr/bin/g++
LDFLAGS = -L. \
-Lpath/to/libMy_Lib.a
CFLAGS = -I. \
-Wall \
-g \
-O0
OBJECTS = obj1.o obj2.o
%.o: %.cpp
$(CXX) -c $*.cpp -o $# \
-Wno-deprecated \
$(CFLAGS)
all: program
program: $(OBJECTS)
$(CXX) $^ \
$(LDFLAGS) \
-o myProg \
-lboost_regex \
-lboost_filesystem \
-lboost_date_time \
-lboost_system \
-lboost_thread \
-lMy_Lib
libMy_Lib.a is a library which also uses boost (I had no problems compiling it on the same system). All the libs look ok in /usr/lib...
Here is the output ld generates (I used make 2> output) http://ubuntuone.com/6QlU7AUZGgLGIu7sHbvDHm
Maybe the order of the libraries isn't correct (I know boost_filesystem depends on boost_system, but I'm not sure about the rest) or I forgot to specify some additional libs on which my program needs to link to...
This really buggs me and I feel like I'm blind to not see it...

Those error messages are impressive:
../../DIAG_DECODER//libDecoder_Element.a(BaseElements_Group.o): In function `bool boost::regex_match<__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >(__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > >&, boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags)':
BaseElements_Group.cpp:(.text._ZN5boost11regex_matchIN9__gnu_cxx17__normal_iteratorIPKcSsEESaINS_9sub_matchIS5_EEEcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEEbT_SD_RNS_13match_resultsISD_T0_EERKNS_11basic_regexIT1_T2_EENS_15regex_constants12_match_flagsE[bool boost::regex_match<__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >(__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > >&, boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags)]+0x4c):
undefined reference to `boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match()'
I added a newline before the 'undefined reference'...
I think you should probably list your library, which uses Boost functions, before any of the Boost libraries.

Related

How to get Tesseract working with CGO on Windows?

I've been trying to get otiai10/gosseract (Go package for Tesseract C++ library) working on Windows without success. As a requirement, gosseract requires the installation of "tesseract-ocr, including library and headers".
The Tesseract Windows compiling documentation mentions the usage of SW and Vcpkg, which to my understanding relies on MSVC and is hence not compatible with Go.
The documentation also mentions the existence of Cygwin packages. I have tried leveraging them by installing tesseract-ocr (5.2.0-1), tesseract-ocr-devel (5.2.0-1), tesseract-ocr-eng (5.00-1) as well as mingw64-x86_64-gcc-g++ and mingw64-x86_64-gcc-core after which I defined the following environment variables:
CGO_CFLAGS=-IC:\cygwin64\usr\include
CGO_CPPFLAGS=-IC:\cygwin64\usr\include
CGO_LDFLAGS=-LC:\cygwin64\lib
PATH=C:\cygwin64\bin;...
CC=C:\cygwin64\bin\x86_64-w64-mingw32-gcc.exe
CXX=C:\cygwin64\bin\x86_64-w64-mingw32-g++.exe
However, trying to compile (through GoLand) an example project (otiai10/ocrserver) still results in linker errors:
GOROOT=C:\Users\REDACTED\go\go1.18rc1 #gosetup
GOPATH=C:\Users\REDACTED\go #gosetup
C:\Users\REDACTED\go\go1.18rc1\bin\go.exe build -o C:\Users\REDACTED\AppData\Local\Temp\GoLand\___go_build_github_com_otiai10_ocrserver.exe github.com/otiai10/ocrserver #gosetup
# github.com/otiai10/gosseract/v2
/usr/lib/gcc/x86_64-w64-mingw32/11/../../../../x86_64-w64-mingw32/bin/ld: $WORK\b133\_x003.o: in function `tesseract::TessBaseAPI::Init(char const*, char const*)':
/cygdrive/c/Users/REDACTED/go/pkg/mod/github.com/otiai10/gosseract/v2#v2.3.1/C:/cygwin64/usr/include/tesseract/baseapi.h:215: undefined reference to `tesseract::TessBaseAPI::Init(char const*, char const*, tesseract::OcrEngineMode, char**, int, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const*, bool)'
/usr/lib/gcc/x86_64-w64-mingw32/11/../../../../x86_64-w64-mingw32/bin/ld: /cygdrive/c/Users/REDACTED/go/pkg/mod/github.com/otiai10/gosseract/v2#v2.3.1/C:/cygwin64/usr/include/tesseract/baseapi.h:215: undefined reference to `tesseract::TessBaseAPI::Init(char const*, char const*, tesseract::OcrEngineMode, char**, int, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const*, bool)'
/usr/lib/gcc/x86_64-w64-mingw32/11/../../../../x86_64-w64-mingw32/bin/ld: /cygdrive/c/Users/REDACTED/go/pkg/mod/github.com/otiai10/gosseract/v2#v2.3.1/C:/cygwin64/usr/include/tesseract/baseapi.h:215: undefined reference to `tesseract::TessBaseAPI::Init(char const*, char const*, tesseract::OcrEngineMode, char**, int, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const*, bool)'
collect2: error: ld returned 1 exit status
How can one get "tesseract-ocr, including library and headers" properly set up on a Windows machine for CGO compatibility?
> go version
go version go1.17 windows/amd64
> C:\cygwin64\bin\x86_64-w64-mingw32-gcc.exe --version
x86_64-w64-mingw32-gcc (GCC) 11.3.0
> C:\cygwin64\bin\x86_64-w64-mingw32-g++.exe --version
x86_64-w64-mingw32-g++ (GCC) 11.3.0
> C:\cygwin64\bin\x86_64-w64-mingw32-ld.exe --version
GNU ld (GNU Binutils) 2.38

Boost Program Options : linking error

I am having errors while compiling my C++ code on the server.
So on this particular server the standard g++ installed is version 4.4.6, which I cannot use for my program since I need -std=c++14.
So I use a different version, which is installed in the home directory of another user, which is a version 7.1, called with command g++_71.
Know all the files compile except one class where I make use of the boost program_options.
When just linking to -lboost_program_options, it wouldn't work, because it would link to an old version of boost, that does not support the functionalities I was using, and also was compiled with the 4.4.6 gcc.
Therefore I downloaded boost version 1.66.0 and installed it in my home directory in a folder I named boost. I made sure that boost was installed with the correct toolset g++_71, even if this should not change a thing for a header-only library which program_options is.
Now I still get linker errors :
objlinux/src/Utilities/Options/OptionsParser.o: In function `OptionsParser::parseOptionsFromCommandline(int, char**)':
OptionsParser.cpp:(.text+0x28c2): undefined reference to `boost::program_options::options_description::options_description(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int)'
objlinux/src/Utilities/Options/OptionsParser.o: In function `boost::program_options::validation_error::validation_error(boost::program_options::validation_error::kind_t, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)':
OptionsParser.cpp:(.text._ZN5boost15program_options16validation_errorC2ENS1_6kind_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_i[_ZN5boost15program_options16validation_errorC5ENS1_6kind_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_i]+0x21): undefined reference to `_ZN5boost15program_options16validation_error12get_templateB5cxx11ENS1_6kind_tE'
OptionsParser.cpp:(.text._ZN5boost15program_options16validation_errorC2ENS1_6kind_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_i[_ZN5boost15program_options16validation_errorC5ENS1_6kind_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_i]+0x3b): undefined reference to `boost::program_options::error_with_option_name::error_with_option_name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
objlinux/src/Utilities/Options/OptionsParser.o: In function `boost::program_options::typed_value<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>::xparse(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) const':
OptionsParser.cpp:(.text._ZNK5boost15program_options11typed_valueINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcE6xparseERNS_3anyERKSt6vectorIS7_SaIS7_EE[_ZNK5boost15program_options11typed_valueINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcE6xparseERNS_3anyERKSt6vectorIS7_SaIS7_EE]+0x17): undefined reference to `boost::program_options::validate(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, int)'
objlinux/src/Utilities/Options/OptionsParser.o: In function `boost::program_options::typed_value<bool, char>::xparse(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) const':
OptionsParser.cpp:(.text._ZNK5boost15program_options11typed_valueIbcE6xparseERNS_3anyERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISB_EE[_ZNK5boost15program_options11typed_valueIbcE6xparseERNS_3anyERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISB_EE]+0x17): undefined reference to `boost::program_options::validate(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool*, int)'
objlinux/src/Utilities/Options/OptionsParser.o: In function `boost::program_options::error_with_option_name::~error_with_option_name()':
OptionsParser.cpp:(.text._ZN5boost15program_options22error_with_option_nameD2Ev[_ZN5boost15program_options22error_with_option_nameD5Ev]+0x17): undefined reference to `vtable for boost::program_options::error_with_option_name'
objlinux/src/Utilities/Options/OptionsParser.o: In function `boost::program_options::error_with_option_name::error_with_option_name(boost::program_options::error_with_option_name const&)':
OptionsParser.cpp:(.text._ZN5boost15program_options22error_with_option_nameC2ERKS1_[_ZN5boost15program_options22error_with_option_nameC5ERKS1_]+0x22): undefined reference to `vtable for boost::program_options::error_with_option_name'
objlinux/src/Utilities/Options/OptionsParser.o: In function `boost::program_options::basic_command_line_parser<char>::run()':
OptionsParser.cpp:(.text._ZN5boost15program_options25basic_command_line_parserIcE3runEv[_ZN5boost15program_options25basic_command_line_parserIcE3runEv]+0x1b): undefined reference to `boost::program_options::detail::cmdline::get_canonical_option_prefix()'
objlinux/src/Utilities/Options/OptionsParser.o: In function `boost::program_options::basic_command_line_parser<char>::basic_command_line_parser(int, char const* const*)':
OptionsParser.cpp:(.text._ZN5boost15program_options25basic_command_line_parserIcEC2EiPKPKc[_ZN5boost15program_options25basic_command_line_parserIcEC5EiPKPKc]+0x14d): undefined reference to `boost::program_options::to_internal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
OptionsParser.cpp:(.text._ZN5boost15program_options25basic_command_line_parserIcEC2EiPKPKc[_ZN5boost15program_options25basic_command_line_parserIcEC5EiPKPKc]+0x1e9): undefined reference to `boost::program_options::detail::cmdline::cmdline(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)'
objlinux/src/Utilities/Options/OptionsParser.o: In function `boost::program_options::basic_parsed_options<char> boost::program_options::parse_command_line<char>(int, char const* const*, boost::program_options::options_description const&, int, boost::function1<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>)':
OptionsParser.cpp:(.text._ZN5boost15program_options18parse_command_lineIcEENS0_20basic_parsed_optionsIT_EEiPKPKS3_RKNS0_19options_descriptionEiNS_9function1ISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESJ_ERKSJ_EE[_ZN5boost15program_options18parse_command_lineIcEENS0_20basic_parsed_optionsIT_EEiPKPKS3_RKNS0_19options_descriptionEiNS_9function1ISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESJ_ERKSJ_EE]+0xaf): undefined reference to `boost::program_options::detail::cmdline::set_additional_parser(boost::function1<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>)'
objlinux/src/Utilities/Options/OptionsParser.o: In function `_ZNK5boost15program_options11typed_valueINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcE4nameB5cxx11Ev':
OptionsParser.cpp:(.text._ZNK5boost15program_options11typed_valueINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcE4nameEv[_ZNK5boost15program_options11typed_valueINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcE4nameEv]+0x32): undefined reference to `_ZN5boost15program_options3argB5cxx11E'
objlinux/src/Utilities/Options/OptionsParser.o: In function `_ZNK5boost15program_options11typed_valueIlcE4nameB5cxx11Ev':
OptionsParser.cpp:(.text._ZNK5boost15program_options11typed_valueIlcE4nameB5cxx11Ev[_ZNK5boost15program_options11typed_valueIlcE4nameB5cxx11Ev]+0x32): undefined reference to `_ZN5boost15program_options3argB5cxx11E'
objlinux/src/Utilities/Options/OptionsParser.o: In function `_ZNK5boost15program_options11typed_valueIbcE4nameB5cxx11Ev':
OptionsParser.cpp:(.text._ZNK5boost15program_options11typed_valueIbcE4nameB5cxx11Ev[_ZNK5boost15program_options11typed_valueIbcE4nameB5cxx11Ev]+0x32): undefined reference to `_ZN5boost15program_options3argB5cxx11E'
objlinux/src/Utilities/Options/OptionsParser.o: In function `_ZNK5boost15program_options11typed_valueIdcE4nameB5cxx11Ev':
OptionsParser.cpp:(.text._ZNK5boost15program_options11typed_valueIdcE4nameB5cxx11Ev[_ZNK5boost15program_options11typed_valueIdcE4nameB5cxx11Ev]+0x32): undefined reference to `_ZN5boost15program_options3argB5cxx11E'
objlinux/src/Utilities/Options/OptionsParser.o: In function `_ZNK5boost15program_options11typed_valueIicE4nameB5cxx11Ev':
OptionsParser.cpp:(.text._ZNK5boost15program_options11typed_valueIicE4nameB5cxx11Ev[_ZNK5boost15program_options11typed_valueIicE4nameB5cxx11Ev]+0x32): undefined reference to `_ZN5boost15program_options3argB5cxx11E'
objlinux/src/Utilities/Options/OptionsParser.o: In function `void boost::program_options::validate<double, char>(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, double*, long)':
OptionsParser.cpp:(.text._ZN5boost15program_options8validateIdcEEvRNS_3anyERKSt6vectorINSt7__cxx1112basic_stringIT0_St11char_traitsIS7_ESaIS7_EEESaISB_EEPT_l[_ZN5boost15program_options8validateIdcEEvRNS_3anyERKSt6vectorINSt7__cxx1112basic_stringIT0_St11char_traitsIS7_ESaIS7_EEESaISB_EEPT_l]+0x4dd): undefined reference to `boost::program_options::invalid_option_value::invalid_option_value(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
objlinux/src/Utilities/Options/OptionsParser.o: In function `void boost::program_options::validate<long, char>(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, long*, long)':
OptionsParser.cpp:(.text._ZN5boost15program_options8validateIlcEEvRNS_3anyERKSt6vectorINSt7__cxx1112basic_stringIT0_St11char_traitsIS7_ESaIS7_EEESaISB_EEPT_l[_ZN5boost15program_options8validateIlcEEvRNS_3anyERKSt6vectorINSt7__cxx1112basic_stringIT0_St11char_traitsIS7_ESaIS7_EEESaISB_EEPT_l]+0x264): undefined reference to `boost::program_options::invalid_option_value::invalid_option_value(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
objlinux/src/Utilities/Options/OptionsParser.o: In function `void boost::program_options::validate<int, char>(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, int*, long)':
OptionsParser.cpp:(.text._ZN5boost15program_options8validateIicEEvRNS_3anyERKSt6vectorINSt7__cxx1112basic_stringIT0_St11char_traitsIS7_ESaIS7_EEESaISB_EEPT_l[_ZN5boost15program_options8validateIicEEvRNS_3anyERKSt6vectorINSt7__cxx1112basic_stringIT0_St11char_traitsIS7_ESaIS7_EEESaISB_EEPT_l]+0x233): undefined reference to `boost::program_options::invalid_option_value::invalid_option_value(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
objlinux/src/Utilities/Options/OptionsParser.o:(.rodata._ZTVN5boost16exception_detail19error_info_injectorINS_15program_options20invalid_option_valueEEE[_ZTVN5boost16exception_detail19error_info_injectorINS_15program_options20invalid_option_valueEEE]+0x20): undefined reference to `boost::program_options::error_with_option_name::what() const'
objlinux/src/Utilities/Options/OptionsParser.o:(.rodata._ZTVN5boost16exception_detail19error_info_injectorINS_15program_options20invalid_option_valueEEE[_ZTVN5boost16exception_detail19error_info_injectorINS_15program_options20invalid_option_valueEEE]+0x30): undefined reference to `boost::program_options::error_with_option_name::substitute_placeholders(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
objlinux/src/Utilities/Options/OptionsParser.o:(.rodata._ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_options20invalid_option_valueEEEEE[_ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_options20invalid_option_valueEEEEE]+0x28): undefined reference to `boost::program_options::error_with_option_name::what() const'
objlinux/src/Utilities/Options/OptionsParser.o:(.rodata._ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_options20invalid_option_valueEEEEE[_ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_options20invalid_option_valueEEEEE]+0x38): undefined reference to `boost::program_options::error_with_option_name::substitute_placeholders(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
objlinux/src/Utilities/Options/OptionsParser.o:(.rodata._ZTVN5boost16exception_detail19error_info_injectorINS_15program_options16validation_errorEEE[_ZTVN5boost16exception_detail19error_info_injectorINS_15program_options16validation_errorEEE]+0x20): undefined reference to `boost::program_options::error_with_option_name::what() const'
objlinux/src/Utilities/Options/OptionsParser.o:(.rodata._ZTVN5boost16exception_detail19error_info_injectorINS_15program_options16validation_errorEEE[_ZTVN5boost16exception_detail19error_info_injectorINS_15program_options16validation_errorEEE]+0x30): undefined reference to `boost::program_options::error_with_option_name::substitute_placeholders(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
objlinux/src/Utilities/Options/OptionsParser.o:(.rodata._ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_options16validation_errorEEEEE[_ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_options16validation_errorEEEEE]+0x28): undefined reference to `boost::program_options::error_with_option_name::what() const'
objlinux/src/Utilities/Options/OptionsParser.o:(.rodata._ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_options16validation_errorEEEEE[_ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_options16validation_errorEEEEE]+0x38): undefined reference to `boost::program_options::error_with_option_name::substitute_placeholders(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
objlinux/src/Utilities/Options/OptionsParser.o:(.rodata._ZTIN5boost15program_options16validation_errorE[_ZTIN5boost15program_options16validation_errorE]+0x10): undefined reference to `typeinfo for boost::program_options::error_with_option_name'
objlinux/src/Utilities/Options/OptionsParser.o:(.rodata._ZTVN5boost15program_options16validation_errorE[_ZTVN5boost15program_options16validation_errorE]+0x20): undefined reference to `boost::program_options::error_with_option_name::what() const'
objlinux/src/Utilities/Options/OptionsParser.o:(.rodata._ZTVN5boost15program_options16validation_errorE[_ZTVN5boost15program_options16validation_errorE]+0x30): undefined reference to `boost::program_options::error_with_option_name::substitute_placeholders(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
objlinux/src/Utilities/Options/OptionsParser.o:(.rodata._ZTVN5boost15program_options20invalid_option_valueE[_ZTVN5boost15program_options20invalid_option_valueE]+0x20): undefined reference to `boost::program_options::error_with_option_name::what() const'
objlinux/src/Utilities/Options/OptionsParser.o:(.rodata._ZTVN5boost15program_options20invalid_option_valueE[_ZTVN5boost15program_options20invalid_option_valueE]+0x30): undefined reference to `boost::program_options::error_with_option_name::substitute_placeholders(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
objlinux/src/Utilities/Options/OptionsParser.o:(.rodata._ZTVN5boost15program_options11typed_valueINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEE[_ZTVN5boost15program_options11typed_valueINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEE]+0x38): undefined reference to `boost::program_options::value_semantic_codecvt_helper<char>::parse(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool) const'
objlinux/src/Utilities/Options/OptionsParser.o:(.rodata._ZTVN5boost15program_options11typed_valueIicEE[_ZTVN5boost15program_options11typed_valueIicEE]+0x38): undefined reference to `boost::program_options::value_semantic_codecvt_helper<char>::parse(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool) const'
objlinux/src/Utilities/Options/OptionsParser.o:(.rodata._ZTVN5boost15program_options11typed_valueIlcEE[_ZTVN5boost15program_options11typed_valueIlcEE]+0x38): undefined reference to `boost::program_options::value_semantic_codecvt_helper<char>::parse(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool) const'
objlinux/src/Utilities/Options/OptionsParser.o:(.rodata._ZTVN5boost15program_options11typed_valueIdcEE[_ZTVN5boost15program_options11typed_valueIdcEE]+0x38): undefined reference to `boost::program_options::value_semantic_codecvt_helper<char>::parse(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool) const'
objlinux/src/Utilities/Options/OptionsParser.o:(.rodata._ZTVN5boost15program_options11typed_valueIbcEE[_ZTVN5boost15program_options11typed_valueIbcEE]+0x38): undefined reference to `boost::program_options::value_semantic_codecvt_helper<char>::parse(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool) const'
collect2: error: ld returned 1 exit status
make: *** [ACOPPD] Error 1
I tried different techniques to resolve this error:
I tried to just do the recommended include : #include "boost/program_options.hpp" and -I /home/mkupper/boost/boost_1_66_0 in the Makefile as it is recommended by the boost documentation for header-only library, which program_options is.
I tried to include with the full path : #include "/home/mkupper/boost/boost_1_66_0/boost/program_options.hpp"
I tried to include -I /home/mkupper/boost/boost_1_66_0 -L /home/mkupper/boost/boost_1_66_0/libs into the linker and compiler flags to.
I tried to include -lboost_program_options in addition to the other includes.
I tried if the -lstdc++ would change anything.
Nothing changes the linker errors, I am helpless !
Here my current Makefile:
CFLAGS := -std=c++14 -Wall -Ofast -march=native -Wunused-parameter
LDFLAGS := -lstdc++ -I /home/mkupper/boost/boost_1_66_0 -L /home/mkupper/boost/boost_1_66_0/libs
BUILDDIR := objlinux
SOURCEDIR := src
HEADERDIR := include
SRCEXT := cpp
OBJEXT := o
SOURCES := $(shell find $(SOURCEDIR) -name '*.$(SRCEXT)')
OBJECTS := $(addprefix $(BUILDDIR)/,$(SOURCES:%.$(SRCEXT)=%.$(OBJEXT)))
BINARY := ./ACOPPD
ECHO := echo
RM := rm -rf
MKDIR := mkdir
.PHONY: all clean
all: $(BINARY)
$(BINARY): $(OBJECTS)
g++_71 $(CFLAGS) $(OBJECTS) -o $(BINARY) $(LDFLAGS)
$(BUILDDIR)/%.$(OBJEXT): %.$(SRCEXT)
g++_71 $(CFLAGS) $(LDFLAGS) -I $(HEADERDIR) -I $(dir $<) -c $< -o $#
clean:
$(RM) $(BINARY) $(OBJECTS)
distclean: clean
The -I option indicates where the compiler needs to find the include files, therefore it belongs to the compiler flags CFLAGS.
The -L option indicates where the linker needs to find the library files, and the -l option tells the linker which libraries to include, therefore both should go into LDFLAGS.
With these said, you have missed the -lboost_program_options flag in LDFLAGS. As a result the linker will not incorporate the boost_program_options library. -L alone here is meaningless.
Bottom lines - try these:
CFLAGS := -std=c++14 -Wall -Ofast -march=native -Wunused-parameter -I/home/mkupper/boost/boost_1_66_0
LDFLAGS := -L/home/mkupper/boost/boost_1_66_0/libs -lstdc++ -lboost_program_options

QuantLib linker error: QuantLib::Error::Error()

I am trying to get QL working on Debian, but failing at the last step. I have downloaded the source, built and installed the library (“make”, “make install”) without any errors, but my application that uses the QuantLib library throws up some linker errors related to a single class (QuantLib::Error):
build/Debug/GNU-Linux-x86/PricingEngine.o: In function `QuantLib::Observable::notifyObservers()':
/usr/local/include/ql/patterns/observable.hpp:143: undefined reference to `QuantLib::Error::Error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
build/Debug/GNU-Linux-x86/PricingEngine.o: In function `QuantLib::operator+(QuantLib::Array const&, QuantLib::Array const&)':
/usr/local/include/ql/math/array.hpp:499: undefined reference to `QuantLib::Error::Error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
build/Debug/GNU-Linux-x86/PricingEngine.o: In function `QuantLib::DiscretizedOption::reset(unsigned long)':
/usr/local/include/ql/discretizedasset.hpp:222: undefined reference to `QuantLib::Error::Error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
build/Debug/GNU-Linux-x86/PricingEngine.o: In function `QuantLib::Instrument::setupArguments(QuantLib::PricingEngine::arguments*) const':
/usr/local/include/ql/instrument.hpp:145: undefined reference to `QuantLib::Error::Error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
build/Debug/GNU-Linux-x86/PricingEngine.o: In function `QuantLib::Instrument::performCalculations() const':
/usr/local/include/ql/instrument.hpp:164: undefined reference to `QuantLib::Error::Error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
build/Debug/GNU-Linux-x86/PricingEngine.o:/usr/local/include/ql/instrument.hpp:176: more undefined references to `QuantLib::Error::Error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' follow
I’m on Debian 8, amd64, compiled both the library and application with g++-5.
Does anyone have any ideas?
EDIT: Here's the command line:
g++ -o dist/Debug/GNU-Linux-x86/hub build/Debug/GNU-Linux-x86/Calculations.o build/Debug/GNU-Linux-x86/Client.o build/Debug/GNU-Linux-x86/Connection.o build/Debug/GNU-Linux-x86/DataStore.o build/Debug/GNU-Linux-x86/Hub.o build/Debug/GNU-Linux-x86/Instruments.o build/Debug/GNU-Linux-x86/Parameters.o build/Debug/GNU-Linux-x86/PricingEngine.o build/Debug/GNU-Linux-x86/Server.o build/Debug/GNU-Linux-x86/main.o build/Debug/GNU-Linux-x86/stdafx.o -L/usr/lib/x86_64-linux-gnu -L/usr/lib ../Core/dist/Debug/GNU-Linux-x86/libcore.a -lQuantLib /usr/lib/x86_64-linux-gnu/libboost_log.a /usr/lib/x86_64-linux-gnu/libboost_log_setup.a -lboost_system -lzmq -lboost_filesystem -lpq -lboost_unit_test_framework -lboost_thread -lpgm -lldap -lssl -lcrypto -lsodium -ldl -pthread
It is likely that PricingEngine.o is compiled with (default) value of _GLIBCXX_USE_CXX11_ABI=1, while QuantLib is compiled with _GLIBCXX_USE_CXX11_ABI=0.
See also example at the end of this answer.

How to include/link boost::regex library?

I am trying to use the boost regex library but I can't manage to compile my program. All related questions which involve similar error messages seem to relate to situations where regex library wasn't properly linked. I think that I am linking it, but maybe I am doing something stupid... Perhaps someone sees my mistake?
Here is my test program:
// ~/workspace/test/test.cpp
#include <string>
#include <iostream>
#include <boost/regex.hpp>
int main(){
std::string s("abaab");
boost::regex r("[ab]*");
std::cout << boost::regex_match(s,r) << std::endl;
}
Here are the boost binaries (I installed them via synaptic on Xubuntu):
/usr/lib/i386-linux-gnu$ ls libboost_regex* -al
-rw-r--r-- 1 root root 2169582 Okt 13 05:14 libboost_regex.a
lrwxrwxrwx 1 root root 24 Okt 13 05:13 libboost_regex.so -> libboost_regex.so.1.53.0
-rw-r--r-- 1 root root 1002568 Okt 13 05:14 libboost_regex.so.1.53.0
Nevertheless I'm getting quite an ugly error message when running
~/workspace/test$ g++ -L/usr/lib/i386-linux-gnu/ -lboost_regex test.cpp
Here is the complete message:
~/workspace/test$ g++ -L/usr/lib/i386-linux-gnu/ -lboost_regex test.cpp
/tmp/cc1yDf0v.o: In function `bool boost::regex_match<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > >, char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >(__gnu_cxx::__normal_iterator<char const*, std::string>, __gnu_cxx::__normal_iterator<char const*, std::string>, boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > > >&, boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags)':
test.cpp:(.text._ZN5boost11regex_matchIN9__gnu_cxx17__normal_iteratorIPKcSsEESaINS_9sub_matchIS5_EEEcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEEbT_SD_RNS_13match_resultsISD_T0_EERKNS_11basic_regexIT1_T2_EENS_15regex_constants12_match_flagsE[_ZN5boost11regex_matchIN9__gnu_cxx17__normal_iteratorIPKcSsEESaINS_9sub_matchIS5_EEEcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEEbT_SD_RNS_13match_resultsISD_T0_EERKNS_11basic_regexIT1_T2_EENS_15regex_constants12_match_flagsE]+0x4c): undefined reference to `boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match()'
/tmp/cc1yDf0v.o: In function `boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::assign(char const*, char const*, unsigned int)':
test.cpp:(.text._ZN5boost11basic_regexIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE6assignEPKcS7_j[_ZN5boost11basic_regexIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE6assignEPKcS7_j]+0x22): undefined reference to `boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::do_assign(char const*, char const*, unsigned int)'
/tmp/cc1yDf0v.o: In function `boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::perl_matcher(__gnu_cxx::__normal_iterator<char const*, std::string>, __gnu_cxx::__normal_iterator<char const*, std::string>, boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > > >&, boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags, __gnu_cxx::__normal_iterator<char const*, std::string>)':
test.cpp:(.text._ZN5boost9re_detail12perl_matcherIN9__gnu_cxx17__normal_iteratorIPKcSsEESaINS_9sub_matchIS6_EEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEC2ES6_S6_RNS_13match_resultsIS6_S9_EERKNS_11basic_regexIcSD_EENS_15regex_constants12_match_flagsES6_[_ZN5boost9re_detail12perl_matcherIN9__gnu_cxx17__normal_iteratorIPKcSsEESaINS_9sub_matchIS6_EEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEC5ES6_S6_RNS_13match_resultsIS6_S9_EERKNS_11basic_regexIcSD_EENS_15regex_constants12_match_flagsES6_]+0xcd): undefined reference to `boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::construct_init(boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags)'
collect2: error: ld returned 1 exit status
The header seems to be found, right? How else could gcc know about boost::re_detail::perl_matcher or boost::basic_regex?
I have no clue what the problem might be. Maybe it is the linking after all?
Thanks in advance!
You just needed to make sure the library comes after your own sources.
g++ -L/usr/lib/i386-linux-gnu/ test.cpp -lboost_regex
This is a FAQ:
Why does the order in which libraries are linked sometimes cause errors in GCC?
g++ linking order dependency when linking c code to c++ code
And probably quite a few more. I guess it's (sadly) one of those rites-of-passage that goes with the territory :(

"symbol(s) not found for architecture x86_64" when trying to build using Make on Mac OS X Lion

I'm having problems to build the Robocup Soccer Server (rcssserver 15.0.1) on Mac OS X Lion.
I think the problem is with Boost.
The following is the output of the "make" (second try, to display just the errors) command:
make all-recursive
Making all in rcssbase
Making all in net
make[3]: Nothing to be done for `all'.
Making all in conf
make[3]: Nothing to be done for `all'.
Making all in gzip
make[3]: Nothing to be done for `all'.
make[3]: Nothing to be done for `all-am'.
Making all in src
make all-am
/bin/sh ../libtool --tag=CXX --mode=link g++ -W -Wall -g -O2 -L../rcssbase/conf -L../rcssbase/net -L../rcssbase/gzip -L/usr/local/lib64 -o rcssserver audio.o bodysender.o coach.o csvsaver.o dispsender.o field.o fullstatesender.o heteroplayer.o initsender.o initsendercoach.o initsenderlogger.o initsendermonitor.o initsenderonlinecoach.o initsenderplayer.o landmarkreader.o logger.o main.o monitor.o netif.o pcombuilder.o pcomparser.o player.o playerparam.o object.o referee.o remoteclient.o resultsaver.o serializer.o serializercoachstdv1.o serializercoachstdv7.o serializercoachstdv8.o serializercoachstdv13.o serializercoachstdv14.o serializercommonstdv1.o serializercommonstdv7.o serializercommonstdv8.o serializermonitor.o serializeronlinecoachstdv1.o serializeronlinecoachstdv6.o serializeronlinecoachstdv7.o serializeronlinecoachstdv8.o serializeronlinecoachstdv13.o serializeronlinecoachstdv14.o serializerplayerstdv1.o serializerplayerstdv7.o serializerplayerstdv8.o serializerplayerstdv13.o serializerplayerstdv14.o serverparam.o stadium.o stdoutsaver.o stdtimer.o synctimer.o team.o utility.o visualsendercoach.o visualsenderplayer.o weather.o xmlreader.o xpmholder.o player_command_parser.o player_command_tok.o -lrcssclangparser -lrcssconfparser -lrcssnet -lrcssgz -lz -lm
libtool: link: g++ -W -Wall -g -O2 -o .libs/rcssserver audio.o bodysender.o coach.o csvsaver.o dispsender.o field.o fullstatesender.o heteroplayer.o initsender.o initsendercoach.o initsenderlogger.o initsendermonitor.o initsenderonlinecoach.o initsenderplayer.o landmarkreader.o logger.o main.o monitor.o netif.o pcombuilder.o pcomparser.o player.o playerparam.o object.o referee.o remoteclient.o resultsaver.o serializer.o serializercoachstdv1.o serializercoachstdv7.o serializercoachstdv8.o serializercoachstdv13.o serializercoachstdv14.o serializercommonstdv1.o serializercommonstdv7.o serializercommonstdv8.o serializermonitor.o serializeronlinecoachstdv1.o serializeronlinecoachstdv6.o serializeronlinecoachstdv7.o serializeronlinecoachstdv8.o serializeronlinecoachstdv13.o serializeronlinecoachstdv14.o serializerplayerstdv1.o serializerplayerstdv7.o serializerplayerstdv8.o serializerplayerstdv13.o serializerplayerstdv14.o serverparam.o stadium.o stdoutsaver.o stdtimer.o synctimer.o team.o utility.o visualsendercoach.o visualsenderplayer.o weather.o xmlreader.o xpmholder.o player_command_parser.o player_command_tok.o -Wl,-bind_at_load -L/Users/samirkerbage/desenv/robocup/softwares/rcssserver-15.0.1/rcssbase/conf -L/Users/samirkerbage/desenv/robocup/softwares/rcssserver-15.0.1/rcssbase/net -L/Users/samirkerbage/desenv/robocup/softwares/rcssserver-15.0.1/rcssbase/gzip -L/usr/local/lib64 /Users/samirkerbage/desenv/robocup/softwares/rcssserver-15.0.1/src/.libs/librcssclangparser.dylib /Users/samirkerbage/desenv/robocup/softwares/rcssserver-15.0.1/rcssbase/conf/.libs/librcssconfparser.dylib /Users/samirkerbage/desenv/robocup/softwares/rcssserver-15.0.1/rcssbase/net/.libs/librcssnet.dylib /Users/samirkerbage/desenv/robocup/softwares/rcssserver-15.0.1/rcssbase/gzip/.libs/librcssgz.dylib -lz -lm
ld: warning: directory not found for option '-L/usr/local/lib64'
Undefined symbols for architecture x86_64:
"boost::system::generic_category()", referenced from:
__static_initialization_and_destruction_0(int, int)in audio.o
global constructors keyed to _ZN4rcss10BodySenderC2ERSoin bodysender.o
global constructors keyed to _ZN5CoachC2ER7Stadiumin coach.o
global constructors keyed to _ZN8CSVSaver4NAMEEin csvsaver.o
global constructors keyed to _ZN4rcss10DispSenderC2ERSoin dispsender.o
global constructors keyed to _ZN4rcss15FullStateSenderC2ERSoin fullstatesender.o
global constructors keyed to _ZN4rcss21InitSenderOnlineCoach7factoryEvin initsenderonlinecoach.o
...
"boost::system::system_category()", referenced from:
__static_initialization_and_destruction_0(int, int)in audio.o
global constructors keyed to _ZN4rcss10BodySenderC2ERSoin bodysender.o
global constructors keyed to _ZN5CoachC2ER7Stadiumin coach.o
global constructors keyed to _ZN8CSVSaver4NAMEEin csvsaver.o
global constructors keyed to _ZN4rcss10DispSenderC2ERSoin dispsender.o
global constructors keyed to _ZN4rcss15FullStateSenderC2ERSoin fullstatesender.o
global constructors keyed to _ZN4rcss21InitSenderOnlineCoach7factoryEvin initsenderonlinecoach.o
...
"boost::filesystem3::path::wchar_t_codecvt_facet()", referenced from:
CSVSaverParam::init(rcss::conf::Builder*) in csvsaver.o
boost::filesystem3::path::path<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::enable_if<boost::filesystem3::path_traits::is_pathable<boost::decay<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::type>, void>::type*)in csvsaver.o
boost::filesystem3::path::path<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::enable_if<boost::filesystem3::path_traits::is_pathable<boost::decay<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::type>, void>::type*)in logger.o
boost::enable_if<boost::filesystem3::path_traits::is_pathable<boost::decay<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::type>, boost::filesystem3::path&>::type boost::filesystem3::path::operator/=<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in logger.o
boost::filesystem3::path::path<char [31]>(char const (&) [31], boost::enable_if<boost::filesystem3::path_traits::is_pathable<boost::decay<char [31]>::type>, void>::type*)in playerparam.o
boost::filesystem3::path::path<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::enable_if<boost::filesystem3::path_traits::is_pathable<boost::decay<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::type>, void>::type*)in playerparam.o
boost::enable_if<boost::filesystem3::path_traits::is_pathable<boost::decay<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::type>, boost::filesystem3::path&>::type boost::filesystem3::path::operator/=<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in playerparam.o
...
"boost::filesystem3::path::m_append_separator_if_needed()", referenced from:
boost::filesystem3::path& boost::filesystem3::path::append<char [14]>(char const (&) [14], std::codecvt<wchar_t, char, __mbstate_t> const&)in csvsaver.o
boost::enable_if<boost::filesystem3::path_traits::is_pathable<boost::decay<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::type>, boost::filesystem3::path&>::type boost::filesystem3::path::operator/=<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in logger.o
boost::enable_if<boost::filesystem3::path_traits::is_pathable<boost::decay<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::type>, boost::filesystem3::path&>::type boost::filesystem3::path::operator/=<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in playerparam.o
boost::enable_if<boost::filesystem3::path_traits::is_pathable<boost::decay<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::type>, boost::filesystem3::path&>::type boost::filesystem3::path::operator/=<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in serverparam.o
"boost::filesystem3::path::m_erase_redundant_separator(unsigned long)", referenced from:
boost::filesystem3::path& boost::filesystem3::path::append<char [14]>(char const (&) [14], std::codecvt<wchar_t, char, __mbstate_t> const&)in csvsaver.o
boost::enable_if<boost::filesystem3::path_traits::is_pathable<boost::decay<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::type>, boost::filesystem3::path&>::type boost::filesystem3::path::operator/=<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in logger.o
boost::enable_if<boost::filesystem3::path_traits::is_pathable<boost::decay<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::type>, boost::filesystem3::path&>::type boost::filesystem3::path::operator/=<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in playerparam.o
boost::enable_if<boost::filesystem3::path_traits::is_pathable<boost::decay<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::type>, boost::filesystem3::path&>::type boost::filesystem3::path::operator/=<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in serverparam.o
"boost::filesystem3::detail::status(boost::filesystem3::path const&, boost::system::error_code*)", referenced from:
CSVSaver::openResultsFile() in csvsaver.o
Logger::openKawayLog() in logger.o
Logger::openTextLog() in logger.o
Logger::openGameLog() in logger.o
ServerParam::init(int const&, char const* const*)in serverparam.o
"boost::filesystem3::detail::create_directories(boost::filesystem3::path const&, boost::system::error_code*)", referenced from:
Logger::openKawayLog() in logger.o
Logger::openTextLog() in logger.o
Logger::openGameLog() in logger.o
ServerParam::init(int const&, char const* const*)in serverparam.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[3]: *** [rcssserver] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Does any of you guys have an idea to help me?
I just lost one night trying to figure this out!
Thanks!
It looks like either you failed to run ./configure or your makefiles are making Linux-specific assumptions about where 64-bit libraries are located, see in particular the error message:
ld: warning: directory not found for option '-L/usr/local/lib64'
Try running ./configure first and if that doesn't work then try doing a 32 bit build instead of 64 bit.