Compiling my Boost/NTL program with c++ on Linux.
- by Martin Lauridsen
Hi SO,
I wrote a client program and a server program, that uses the NTL library and Boost::Asio, to do client/server communication for an integer factorization application, in C++.
Both sides consist of several headers and cpp files. Both project compile fine individually on Windows in Visual Studio. All I did, was add the include path of NTL and Boost to both projects:
Additional include paths: "D:\Downloads\WinNTL-5_5_2\include";D:\boost_1_42_0
Furthermore, for both projects, I added the two library paths to both projects in VS:
Additional library directories: D:\boost_1_42_0\stage\lib;"D:\Documents\Visual Studio 2008\Projects\ntl\Debug"
And added under Additional dependencies:
ntl.lib
As said, it compiles fine on Windows. But when I put the code on a Linux machine provided by university, I try to compile with the following statement
c++ -I/appl/htopopt/Linux_x86_64/NTL-5.4.2/include -I/appl/htopopt/Linux_x86_64/boost_1_43_0/include client_protocol.cpp mpqs_client.cpp mpqs_sieve.cpp mpqs_helper.cpp -o mpqs_helper -L/appl/htopopt/Linux_x86_64/NTL-5.4.2/lib -lntl -L/appl/htopopt/Linux_x86_64/gmp-4.2.1/lib -lgmp -lm -L/appl/htopopt/Linux_x86_64/boost_1_43_0/lib -lboost_system -static
Upon doing this, I get a huuuge error, which I posted here. Any idea how to fix this, please??