Boost logo

Boost Users :

From: 7stud (bbxx789_05ss_at_[hidden])
Date: 2008-04-20 21:21:03


Jens Seidel <jensseidel <at> users.sf.net> writes:
>
> Please use the C++ compiler "g++" instead of the C compiler "gcc".
>

Whoops. Somewhere between my first post and my second post I began
using the gcc command instead of the g++ command. The program
compiles fine when I use the command:

g++-I /usr/local/boost_1_34_1 prog1.cpp

> > /usr/bin/ld: Undefined symbols:
>
> Ah, OK, now the compiler error vanished as the compiler is able to
> find the header files of boost.
>
> [The following can probably be ignored as I missed at the beginning
> the you used the C compiler. Nevertheless you may find the next
> usful in you later steps:]
>
> Now the linker complains about symbols (such as functions) defined in a
> Boost library which you have to link against.
>
> You need for linking the additional options
> -L /usr/local/boost_1_34_1/lib/ (to specify the library search path)
> -l boost??? (to specify the library)
>
> Sorry, I do not remember the library name which contains lambda. Just
> look into your /usr/local/boost_1_34_1/ for available
> dynamic lib/libboost*.so or lib/libboost*.a static libraries and choose
> the right one (without lib prefix or .so or a suffix).
>
> Please note that this kind of question indicate that you are not very
> familiar with a C++ compiler.
>

You are right. I am not familiar with the gcc compilers. I've used
MS VC++6 for about 10 years to write and compile C++ programs,
but I recently switched from windows to a mac. Mac's have an
IDE called Xcode for writing and compiling C++ programs,
and that's what I've been using recently.

>That's not a problem but please try to find
> such answers yourself by following more basic C++/g++ tutorials.
>
> Starting with a simple "Hello world" program is typically the first
> step.
>

I can compile a 'hello' world problem using the command line, but
that's about it.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net