Undefined symbols for architecture x86_64 buiding

2019-08-28 15:47发布

I am trying to create a simple Fix client-server using QuickFix and I have tried to implement QuickFix.Application interface.

During the building I have faced this problem : "Undefined symbols for architecture x86_64" and despite I have already read all the relative answers to this question and trying everything suggested I have still the above issue.

I am using Netbeans and C++, and this is the error I got

 g++ -o dist/Debug/GNU-MacOSX/fix_engine_server build/Debug/GNU-MacOSX/Application.o build/Debug/GNU-MacOSX/main.o  -lstdc++
 Undefined symbols for architecture x86_64:
 "FIX::Message::toString(std::__1::basic_string<char,   std::__1::char_traits<char>, std::__1::allocator<char> >&, int, int, int) const", referenced from:
 FIX::operator<<(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, FIX::Message const&) in Application.o
 ld: symbol(s) not found for architecture x86_64
 clang: error: linker command failed with exit code 1 (use -v to see invocation)
 make[2]: *** [dist/Debug/GNU-MacOSX/fix_engine_server] Error 1
 make[1]: *** [.build-conf] Error 2
 make: *** [.build-impl] Error 2

On Netbeans->preferences->C/C++->C++_Compiler : /usr/bin/g++

On Property->Linker->Additional_Options : -lstdc++ On Property->Linker->Tool : g++

Any suggestion ?

标签: c++ linker
0条回答
登录 后发表回答