Boost logo

Boost :

From: Chuck Messenger (chuckm_at_[hidden])
Date: 2003-05-21 09:27:36


I can't link much of the sample code shown in the documentation.

In particular, I tried compiling the code included in the section titled
"Variables map", with gcc3.2.2. I got the link error:

     test2.cpp:40: undefined reference to
`boost::program_options::variables_map::variables_map[in-charge]()'

The error message references this line of code:

     po::variables_map vm;

Bere's the script I run to compile the code:

     #!/bin/bash

     BOOST=../../../src/pub/boost_1_30_0
     LIBSRC=$BOOST/libs/program_options/src

     g++ -I$BOOST -c test2.cpp
     g++ -I$BOOST -c $LIBSRC/cmdline.cpp
     g++ -I$BOOST -c $LIBSRC/config_file.cpp
     g++ -I$BOOST -c $LIBSRC/options_description.cpp
     g++ -I$BOOST -c $LIBSRC/parsers.cpp

     g++ -o test2 test2.o cmdline.o config_file.o
options_description.o parsers.o

Comment: it would be helpful to show examples of using the sample
programs which are given in the documentation, along with expected output.

     - Chuck

Aleksey Gurtovoy wrote:
> The formal review of Vladimir Prus' Command Line & Config
> ("program_options") library starts today, May 21, and will continue until
> Monday, June 2nd. I will be serving as review manager.
...


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk