Issue
I utilize a conan recipe to build the TWS-API in C++ .. and recently (4-10 months ago) IBKR pushed in a prebuilt library into the mix.. some intel lib..
I tried to fix all the code , refresh function definitions.. but on linking I am getting stuck
...
-- Library z found /home/emcp/.conan/data/zlib/1.2.12/_/_/package/dfbe50feef7f3c6223a476cd5aeadb687084a646/lib/libz.a
-- Library bz2 found /home/emcp/.conan/data/bzip2/1.0.8/_/_/package/c32092bf4d4bb47cf962af898e02823f499b017e/lib/libbz2.a
-- Library backtrace found /home/emcp/.conan/data/libbacktrace/cci.20210118/_/_/package/dfbe50feef7f3c6223a476cd5aeadb687084a646/lib/libbacktrace.a
-- Library ssl found /home/emcp/.conan/data/openssl/1.1.1o/_/_/package/dfbe50feef7f3c6223a476cd5aeadb687084a646/lib/libssl.a
-- Library crypto found /home/emcp/.conan/data/openssl/1.1.1o/_/_/package/dfbe50feef7f3c6223a476cd5aeadb687084a646/lib/libcrypto.a
-- Conan: Adjusting default RPATHs Conan policies
-- Conan: Adjusting language standard
-- Current conanbuildinfo.cmake directory: /home/emcp/git/build_cmake
-- Conan: Compiler GCC>=5, checking major version 11
-- Conan: Checking correct version: 11
-- Configuring done
-- Generating done
-- Build files have been written to: /home/emcp/Dev/git/build_cmake
[ 12%] Building CXX object CMakeFiles/ibrokers_server.dir/src/ibrokers_server.cpp.o
[ 25%] Building CXX object CMakeFiles/ibrokers_server.dir/src/gen-cpp/ibrokers.cpp.o
[ 37%] Building CXX object CMakeFiles/ibrokers_server.dir/src/gen-cpp/ibrokers_types.cpp.o
[ 50%] Building CXX object CMakeFiles/ibrokers_server.dir/src/tws-client/AccountSummaryTags.cpp.o
[ 62%] Building CXX object CMakeFiles/ibrokers_server.dir/src/tws-client/AvailableAlgoParams.cpp.o
[ 75%] Building CXX object CMakeFiles/ibrokers_server.dir/src/tws-client/TestCppClient.cpp.o
[ 87%] Building CXX object CMakeFiles/ibrokers_server.dir/src/tws-client/Utils.cpp.o
[100%] Linking CXX executable bin/ibrokers_server
/usr/bin/ld: CMakeFiles/ibrokers_server.dir/src/tws-client/TestCppClient.cpp.o: in function `decimalStringToDisplay[abi:cxx11](unsigned long long)':
TestCppClient.cpp:(.text._Z22decimalStringToDisplayB5cxx11y[_Z22decimalStringToDisplayB5cxx11y]+0x46): undefined reference to `__bid64_to_string'
/usr/bin/ld: /home/emcp/.conan/data/twsapi/10.17.01/stonks/prod/package/062863c92a5a0a247840166e9f84ebe8d10786b9/lib/libtwsapi.a(EClient.cpp.o): in function `void EClient::EncodeField<unsigned long long>(std::ostream&, unsigned long long)':
EClient.cpp:(.text+0x52e): undefined reference to `__bid64_to_string'
/usr/bin/ld: /home/emcp/.conan/data/twsapi/10.17.01/stonks/prod/package/062863c92a5a0a247840166e9f84ebe8d10786b9/lib/libtwsapi.a(EDecoder.cpp.o): in function `EDecoder::DecodeField(unsigned long long&, char const*&, char const*)':
EDecoder.cpp:(.text+0x803c): undefined reference to `__bid64_from_string'
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/ibrokers_server.dir/build.make:247: bin/ibrokers_server] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/ibrokers_server.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
chmod: cannot access 'ibrokers_server': No such file or directory
Is there a way I can .. ensure or refresh my conan cache other than erase the build area and do
conan install .. --upgrade
?
Solution
according to this post https://github.com/InteractiveBrokers/tws-api/issues/1150#issuecomment-1215515313
we have a problem with the new intel code not linking properly.. this user was on Debian and was able to apt install the library.. and link it manually
sudo apt install libintelrdfpmath-dev
and in your linker.. add this module
bidgcc000
Answered By - Erik Answer Checked By - Mildred Charles (WPSolving Admin)