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

Girish Ramakrishnan girish at forwardbias.in
Tue Jun 2 07:12:04 CEST 2009


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).

Girish



More information about the Qt-interest-old mailing list