|
Boost-Build : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-01-25 02:18:07
On Monday 24 January 2005 20:47, David Abrahams wrote:
> > This looks strange. The OBJ type is defined like this:
> >
> > type OBJ : obj : : NT CYGWIN ;
> > type OBJ : o ;
> >
> > so on NT or CYGWIN, "obj" suffix should be used. What suffix is used when
> > you build "examples/hello"?
>
> bjam -d+2 --v2 gcc
> MkDir1 bin\gcc
>
> mkdir "bin\gcc"
>
> MkDir1 bin\gcc\debug
>
> mkdir "bin\gcc\debug"
>
> gcc.compile.c++ bin\gcc\debug\hello.o
Oops! Some thoughts:
1. Make sure you don't have any local modifications.
2. ECHO the value of [ os.name ] at the top of 'obj.jam'.
3. If [ os.name ] value is OK (either NT or CYGWIN), try removing the second
line:
type OBJ : o ;
If that changes the suffix, it means the 'type' rule is
tools/type/register.jam is somehow broken.
4. If removing
type OBJ : o ;
does not change the suffix, try adding debug prints to
virtual-target.add-suffix to make sure the wrong suffix is generated there.
> "c:/tools/MinGW-2.0/bin/gcc.exe" -o "bin\gcc\debug\hello.exe"
> "bin\gcc\debug\hello.o" -g
>
> bin\gcc\debug\hello.o: In function `main':
> c:/boost/tools/build/v2/example/hello/hello.cpp:14: undefined reference to
> `std::cout'
I'd suggest you use "c:/tools/MinGw-2.0/bin/g++.exe" as the command, so that
C++ libraries are linked in.
- 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