K
Kevin Frey
I am working on a test migration of our project to Visual Studio 2005 Beta 2
as a precursor to the availability of the full release of VS2005.
The most onerous problem so far concerns the requirement by LINK.EXE that if
an object file has used precompiled headers, then the resulting "precompiled
header object file" must also be one of the objects in the link.
(Whilst it does not affect my problem - I would dearly like to know why this
requirement exists? I thought a precompiled header was simply a pre-parsed
representation of the header...)
My problem is that much of our project is compiled into static libraries
which are then linked by multiple targets within the project.
I find that I cannot link with the static library unless I also link with
the precompiled header object file that was involved in the compile of those
objects in the static library (we have a separate precompiled header per
target in case compile options differ between targets). Interestingly, I
tried putting the precompiled header object file into the library but the
linker will not resolve it from there.
Is this behaviour correct? It seems ludicrous that if I were selling a
static library how on earth would I ship it to customers? With the
precompiled object file separate? Or would I have to forego the benefits of
using precompiled headers?
I could of course be entirely wrong about all of this, so if that's the case
I would appreciate being informed as to what I am doing wrong and how to
correct it.
Kevin.
as a precursor to the availability of the full release of VS2005.
The most onerous problem so far concerns the requirement by LINK.EXE that if
an object file has used precompiled headers, then the resulting "precompiled
header object file" must also be one of the objects in the link.
(Whilst it does not affect my problem - I would dearly like to know why this
requirement exists? I thought a precompiled header was simply a pre-parsed
representation of the header...)
My problem is that much of our project is compiled into static libraries
which are then linked by multiple targets within the project.
I find that I cannot link with the static library unless I also link with
the precompiled header object file that was involved in the compile of those
objects in the static library (we have a separate precompiled header per
target in case compile options differ between targets). Interestingly, I
tried putting the precompiled header object file into the library but the
linker will not resolve it from there.
Is this behaviour correct? It seems ludicrous that if I were selling a
static library how on earth would I ship it to customers? With the
precompiled object file separate? Or would I have to forego the benefits of
using precompiled headers?
I could of course be entirely wrong about all of this, so if that's the case
I would appreciate being informed as to what I am doing wrong and how to
correct it.
Kevin.