Boost logo

Boost-Build :

Subject: Re: [Boost-build] bjam - win - ordering of obj files
From: Anant Rao (arao_at_[hidden])
Date: 2009-12-19 11:03:03

Hi Volodya,

Hope you got my email with attachments.

FYI - I just wanted to mention that this issue is random - that is, sometimes it works fine by putting 'aprwrapper.obj' at the beginning.
I'm writing this so that it might help you diagnose the problem.

Thanks in advance,

-----Original Message-----
From: boost-build-bounces_at_[hidden] [mailto:boost-build-bounces_at_[hidden]] On Behalf Of Vladimir Prus
Sent: Wednesday, December 16, 2009 10:41 PM
To: Boost.Build developer's and user's list
Subject: Re: [Boost-build] bjam - win - ordering of obj files

On Saturday 12 December 2009 19:11:36 Anant Rao wrote:

> Hi,
> My jamfile is like this on Windows to generate a dll.
> lib blah
> : aprwrapper.cpp
> file1.cpp
> file2.cpp
> ;
> The bjam-generated .rsp file is like this:
> file1.obj
> file2.obj
> aprwrapper.obj
> The generated DLL gives an 'Invalid access to memory' at run-time, whereas that generated with MSVC IDE works fine. (This is because of ordering of global statics).
> If I move aprwrapper.obj to the top in the .rsp file and just run the link command, then the bjam-generated DLL is fine.

Do you give *exact* content of Jamfile and rsp? I am afraid I do not see how such reordering can happen given
the names and types of the files you have provided.

> My questions:
> 1. Is there a way to force bjam to place the obj files in a particular order or at least in the same order as given by the src file list - for the link step?

You might want to have


in requirements for the files that need specific order.

> 2. Assuming Microsoft published how it orders the obj files in its IDE's link step, can bjam follow the same?
> This is the most preferable way so that there's no discrepancy in output between bjam and MSVC IDE.

I cannot comment without seeing the reproducer.

- Volodya
Unsubscribe & other changes:

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at