From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-05-21 09:45:46
Chuck Messenger wrote:
> 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
> Bere's the script I run to compile the code:
> 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
I think the error is due to the fact that you did not compile
"variables_map.cpp". Probably, it would be more convenient to
add test2.cpp to "examples" directory, tweak the Jamfile and
build test2 using bjam? At least, all the provided examples build
> Comment: it would be helpful to show examples of using the sample
> programs which are given in the documentation, along with expected output.
Agreed. In fact, I was thinking that some kind of automated tests for
examples would be good, too.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk