[Qt-interest] Specifying the /MACHINE:XXX flag

Bob Hood bhood2 at comcast.net
Tue Jun 2 16:37:30 CEST 2009


Girish Ramakrishnan wrote:
> Bob Hood wrote:
>> I just added a Resource File to my compile (based upon the instructions
>> for adding an application icon:
>> http://doc.trolltech.com/4.0/appicon.html), and now I'm getting the
>> error "module machine type 'x64' conflicts with target machine type
>> 'X86'" error message when trying to link from within the Visual Studio
>> 2008 IDE.  If I remove the Resource File, the error goes away (and so
>> does the application icon).  Setting the /MACHINE:X64 (or /MACHINE:X86)
>> flag in the Visual Studio Project settings solves the problem in the IDE
>> build.  How do I specify this in the Qmake *.pro file in order to get
>> the Visual Studio projects files to pick it up in the linker settings
>> when I generate the project files (i.e., 'qmake -spec win32-msvc2008 -tp
>> vc ...')?
>
> Shouldn't the /machine be set correctly by the compiler/linker
> automatically? Anyway, it looks like you can set it using the
> QMAKE_LFLAGS_WINDOWS (and other QMAKE_LFLAGS_*) qmake variables.
>
> (Also, see
> http://www.qtsoftware.com/developer/task-tracker/index_html?method=entry&id=118062
> for an example).
>

I'd have thought that, and the command-line build doesn't display this
error.  It only seems to be an issue with the generated Visual Studio
2008 projects, and while I've not tried doing a 32-bit build, it may
only manifest using the 64-bit build.

Thanks, Girish.  I'll have a look at this.


 

Render me gone,                       |||
Bob                                 ^(===)^
---------------------------------oOO--(_)--OOo---------------------------------
                      "If ya can't beat 'em, tariff 'em."
                                   - /Harley-Davidson Motor Company/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090602/3ba4e29b/attachment.html 


More information about the Qt-interest-old mailing list