[racket-dev] Debuging Racket in Windows X64

From: Antonio Menezes Leitao (antonio.menezes.leitao at ist.utl.pt)
Date: Tue Nov 29 19:10:04 EST 2011

Hi,

While trying to build libmysterx using VisualStudio 2010 with
Debug configuration for x64 I got a linker error saying:

fatal error LNK1112: module machine type 'x64' conflicts with target
machine type 'X86'

The error seems related to the fact that the Debug configuration for
subproject myssink
uses /MACHINE:I386 as additional options to the linker, even when the
target machine
type says x64.  This can be seen in the file myssink.vcxproj:

  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <Midl>
      <WarningLevel>3</WarningLevel>
      <TargetEnvironment>X64</TargetEnvironment>
     ...
    </Midl>
    <ClCompile>
      <Optimization>Disabled</Optimization>
     ...
    </ClCompile>
    <Link>
      <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
      ...

Changing the previous line to /MACHINE:X64 solves the problem for this
particular file but a quick search revealed that there are a few other project
files with the same configuration.  Is this the correct configuration? What
do you usually do when you need to debug Racket internals (particularly,
mysterx)?

Best,
Antonio.


Posted on the dev mailing list.