I have a problem with gcc. I am trying to work with boost
program_options and the simplest example:
g++ /usr/share/doc/libboost1.49-doc/examples/libs/program_options/example/first.cpp -o /tmp/o -lboost_program_options
On my Debian unstable and Ubuntu 12.10 systems, it works no problem but on another 12.10 (this one 32-bit) it fails to link and dies with a host of reference errors. I played around with that boost installation in the past so I suspect I may have broken something. The question is--how can I figure out what the problem is? I tried adding
-v but I couldn't understand the output.
This is really a more broad question:
-l does not link what it should be linking. Yes, the files are where they are expected to be, named correctly and in the search path. How do I peek inside the linking process to figure out what's going wrong?