Re: Problems using Boost, Pls Advise
From: llewelly (llewelly.at_at_xmission.dot.com)
Date: 04/28/04
- Next message: JKop: "Re: Speed up you typing speed more than 100 wpm"
- Previous message: JKop: "Declaring war on macros"
- In reply to: sbobrows: "Problems using Boost, Pls Advise"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 28 Apr 2004 05:34:02 -0400
sbobrows <sbobrows@animatedlearning.com> writes:
> {Whilst I think much of this is OT for this newsgroup, I think the issue
> of understanding diagnostics just about gets under the door. -mod}
>
> Hi,
>
> I'm a C++ newbie trying to use the Boost regex libraries. Here's my
> situation.
>
> My system is Red Hat Linux 9, using the Borland C++BuilderX Personal IDE
> (which uses the g++ compiler).
>
> I downloaded and installed Boost from boost.org using the command:
>
> bjam -sTOOLS=gcc install
>
> The install seemed to complete fine, with 2900+ targets updated.
>
> The libraries install in /usr/local/include/boost-1_31/boost.
>
> I created the following link:
>
> ln -s /usr/local/include/boost-1_31/boost /usr/include/boost
>
> I then use C++BuilderX to try and compile one of the example programs
> for the regex libaries that I found in the documentation. The source
> code is:
>
{quoted code snipped by mod. -mod/fwg}
[snip]
I don't know how to answer this without making the answer g++
specific. So those of you without g++, please bear with me.
Most libraries consist of two parts: header files, and binary
libraries containing compiled code. On most unicies, any error
about 'undefined reference to ...' or 'undefined symbol ...'
means the compiled binary libs were not found, or are
inconsistent with the header files.
You need to tell your compiler how to link in the binary library
containing the compiled code for boost::regex.
This will be different for each implementation, but for GCC, you must
tell the compiler two things:
(0) The name of the binary library, using '-l<library name>',
(1) The location of the library, using
'-L<directory containing compiled library>'
So your link command line should look something like this:
g++ linux/Debug_Build/splittest.o -lboost_regex -L/usr/local/lib
Finally see the gcc documentation: http://xrl.us/bx2p .
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
- Next message: JKop: "Re: Speed up you typing speed more than 100 wpm"
- Previous message: JKop: "Declaring war on macros"
- In reply to: sbobrows: "Problems using Boost, Pls Advise"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|