Guy Rutenberg

Keeping track of what I do

Archive for the ‘gcc’ tag

GCC Usage quirks

with one comment

This is more of a note to myself, as it’s an error I keep bumping into. When compiling manually using gcc (or g++) you should pass all the libraries you’re compiling against at the end of the argument list. E.g.:

g++ -Wall -lboost_thread my_file.cpp

will result in error like:

undefined reference to `boost::thread::join()'
undefined reference to `boost::thread::~thread()'

while

g++ -Wall vortex5_brute.cpp -lboost_thread

works fine.

Written by Guy

November 27th, 2011 at 12:50 am

Posted in Tips

Tagged with