Hi Simen,
>From what I can see from your example you simply forgot to link towards the boost library. To link is at best a treacherous bussiness so what you have to do is:

g++ -o first.x first.cpp -L/path/to/boost/libraries/build/dir/ -lboost_program_options_gcc -I/path/to//boost/includes/

It is not clear to me why the '-L' option is needed, but it is. If this does not work on your system just write:

export LD_LIBRARY_PATH=/path/to/boost/libraries/build/dir/:$LD_LIBRARY_PATH

then it should work.

Good luck
Andreas Saebjoernsen

On 1/6/06, Simen Kvaal < simen.kvaal@cma.uio.no> wrote:
Dear all,

I have problems with the program_options library. I am using boost 1.33.1
and gcc 3.2.3, and I notice that there are others with the same problem.
However, I cannot find a reference to with a solution anywhere.

Stated simply: My programs (even the example programs included with boost
1.33.1) using program_options do not link!

For example (gcc 3.2.3):

$ g++ -o first.x first.cpp
/tmp/ccM0BLhg.o(.text+0x4a): In function `main':
: undefined reference to
`boost::program_options::options_description::options_description(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, unsigned int)'

[ ... and a dozen more similar errors ... ]

(As far as I can see, all header files in boost/program_options/ are
included in boost/program_options.hpp.)

I would appreciate any help with this.


Regards,
Simen Kvaal.


--
---- Simen Kvaal -- Ph.D student --------+-------------------------
   Centre of Mathematics for Applications | cell:   +47 90199552
         Room 1039, N.H.Abel's House, UiO | office: +47 22855681
             http://folk.uio.no/simenkva/ | simen.kvaal@cma.uio.no
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users