Discussion:
Build solution for Win32 and Win64?
(too old to reply)
Vincent Fatica
2009-08-28 14:23:26 UTC
Permalink
What's the best way to set up a solution so that it can be built for Win32
and/or Win64 with the two targets sharing source files and with a symmetric
directory structure (e.g., Win32\Release and Win64\Release). [Or perhaps I
should be striving for something else ... but sharing sources is a must.]

Thanks.
--
- Vince
David Lowndes
2009-08-28 14:48:25 UTC
Permalink
Post by Vincent Fatica
What's the best way to set up a solution so that it can be built for Win32
and/or Win64 with the two targets sharing source files and with a symmetric
directory structure (e.g., Win32\Release and Win64\Release). [Or perhaps I
should be striving for something else ... but sharing sources is a must.]
The default seems to work ok for me!

From an existing Win32 project/solution, I just create a 64-bit
configuration.

The only significant hassle is with Setup/Deployment projects - you
have to have both 32-bit and 64-bit versions, which is a PITA to
maintain. I hope I've not missed a trick here!

Dave
Vincent Fatica
2009-08-28 20:12:52 UTC
Permalink
On Fri, 28 Aug 2009 15:48:25 +0100, David Lowndes <***@example.invalid>
wrote:

|The default seems to work ok for me!
|
|From an existing Win32 project/solution, I just create a 64-bit
|configuration.

I get errors like these when I build the x64 config.

CVTRES : fatal error CVT1100: duplicate resource. type:DIALOG, name:101,
language:0x0409
1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or
corrupt
--
- Vince
David Lowndes
2009-08-28 21:15:11 UTC
Permalink
Post by Vincent Fatica
I get errors like these when I build the x64 config.
CVTRES : fatal error CVT1100: duplicate resource. type:DIALOG, name:101,
language:0x0409
1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or
corrupt
Then something's amiss with your project in that configuration. What
happens if you do a full rebuild?

If you start from a new project, then create an x64 configuration, do
you have any such problem?

Dave
Vincent Fatica
2009-08-29 01:50:17 UTC
Permalink
On Fri, 28 Aug 2009 22:15:11 +0100, David Lowndes <***@example.invalid>
wrote:

|>I get errors like these when I build the x64 config.
|>
|>CVTRES : fatal error CVT1100: duplicate resource. type:DIALOG, name:101,
|>language:0x0409
|>1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or
|>corrupt
|
|Then something's amiss with your project in that configuration. What
|happens if you do a full rebuild?
|
|If you start from a new project, then create an x64 configuration, do
|you have any such problem?

For some reason I had added the .RES file to the project. There were no
complaints when it was just Win32. I removed it and all is OK.
--
- Vince
Tamas Demjen
2009-08-28 23:19:00 UTC
Permalink
Post by Vincent Fatica
I get errors like these when I build the x64 config.
CVTRES : fatal error CVT1100: duplicate resource. type:DIALOG, name:101,
language:0x0409
Do you have multiple .rc files by any chance? Each resource ID must be
unique. You have to consolidate those IDs.
Post by Vincent Fatica
1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or
corrupt
Are you linking the right .lib/.obj files to your project? That is,
debug\* for the Win32, x64\debug\* for the x64? Maybe linking an OMF
type of .lib produced by a non-MS compiler?

Note that you can't use 32-bit .obj, .lib, .dll with 64-bit projects. If
a library only exists in 32-bit format, you have to wrap it into a
command line app, or an out-proc COM server, before you can use it in
64-bit.

Tom
Loading...