|
Boost-Build : |
From: David Abrahams (dave_at_[hidden])
Date: 2003-02-25 11:27:21
Vladimir Prus <ghost_at_[hidden]> writes:
> David Abrahams wrote:
>> OK, I made some progress with the limited "test_all.py msvc" (no
>> version). Now it fails here. I'm a bit stumped now; not quite sure
>> what this is supposed to be doing or why it's failing.
>
> a.obj : error LNK2001: unresolved external symbol "void __cdecl z2(void)"
> (?z2@@YAXXZ)
> a.obj : error LNK2001: unresolved external symbol "void __cdecl z1(void)"
> (?z1@@YAXXZ)
> a.obj : error LNK2001: unresolved external symbol "int __cdecl bar(void)"
> (?bar@@YAHXZ)
> bin\msvc\debug\a.exe : fatal error LNK1120: 3 unresolved externals
> Microsoft (R) Incremental Linker Version 6.00.8447
>
> Considering the first two functions: They are declared in z.cpp depending on
> value of the SELECT macros. The idea is that z.cpp should be compiled two
> times: once with SELECT equal to 1 and then with SELECT equal to 2. These
> compilations should define z1 and z2 respectively.
>
> The most likely problem is that obj_1 and obj_2 main targets are not linked to
> a.exe.
That's very true; that is what's (not) happening. But how do we get
it to start happening?
> You might want to use PRESEVE to get the state of testing directory,
> copy that to tools/build/test and run bjam manually to see what
> happens.
I tried that but it didn't tell me anything interesting. obj_1.obj
and obj_2.obj are not written into the linker response file.
> Try also
>
> bjam msvc obj_1
Works just fine:
msvc.compile bin\msvc\debug\main-target-obj_1\obj_1.obj
z.cpp
...updated 1 target...
-- Dave Abrahams Boost Consulting www.boost-consulting.com
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