Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2007-12-10 04:28:36


Petrus B. van Bork wrote:

> Dear Colleagues:
>
> I continue to struggle - fruitlessly - to correctly compile the
> "simple_ls" program. I would like to remind those reading this post
> that this is not my code, it is an example from the getting started with
> boost materials. I would also like to note that I have spent many
> hours with the documentation so suggestions that I RTFM are not terribly
> constructive. If I have mis-read something in the documentation, that
> would, of course, be different.
>
> I have spent several more person-days on this without success. I am
> running the mingw 3.4.5. over Win XP and my IDE is Eclipse 4.0.2
.....
> Here is my console output:
>
>
> **** Build of configuration Debug for project BoostTest ****
>
> mingw32-make all
> 'Building target: BoostTest.exe'
> 'Invoking: MinGW C++ Linker'
> g++
> -L"e:\BoostCPlusLibraries\bin\boost_1_34_1\bin.v2\libs\filesystem\build\gcc-mingw-3.4.5\debug\-lboost_filesystem-mgw34-d-1_34_1"
> -Wl,--out-implib=boost -o"BoostTest.exe" ./main.o
> -l"e:\BoostCPlusLibraries\boost_1_34_1\bin.v2\libs\filesystem\build\gcc-mingw-3.4.5\debug\boost_filesystem-mgw34-d-1_34_1.a"
> e:\mingw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe:
> cannot find
> -le:\BoostCPlusLibraries\boost_1_34_1\bin.v2\libs\filesystem\build\gcc-mingw-3.4.5\debug\boost_filesystem-mgw34-d-1_34_1.a
> collect2: ld returned 1 exit status

This is not a valid -l syntax, as gcc's fine manual will tell. In addition,
you really supposed to install boost, and then link to the library in the
install tree.

> mingw32-make: *** [BoostTest.exe] Error 1
>
> I have tried every imaginable combination of paths to the
> libraries, places to put them, etc., etc. I have spent much time on the
> 'net looking for alternate documentation or answers. I have even
> re-installed everything, re bjammed you name it. No matter what I do, I
> get the same, error "cannot find etc..."

Have you previously linked to static libraries from a CDT project? If not,
I suggest you start by doing that -- like by creating separate "Static library"
CDT project, building it, and putting the library somehwere and trying to link to it
from an Executable project. We can't help with this part.

If you've done that successfully, can you describe in what what the library
produced by building Boost is wrong, so that CDT can't link to it? So far,
your question seems like generic CDT user question, and we don't support CDT.

- Volodya


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk