3

Today I want to build the open source godot project (http://www.godotengine.org/wp/) on Windows 7. I give attention to the compiling instructions (http://www.godotengine.org/wiki/doku.php?id=compiling_windows) but when I use SCons in the command line, I get this:

fatal error LNK1112: module machine type 'x86' conflicts with target machine type 'X64'

This problem is already described here:

[linking problem: fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86' (linking problem: fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86')

But I have another question. I know, I have to define the architecture type of environment variable in SConstruct file (I can post it here, if you want). Unfortunately it doesn't work as thought.

At first I edited the line, where the environment variable is initialized:

env_base=Environment(tools=custom_tools,ENV = {'PATH' : os.environ['PATH']},TARGET_ARCH='x86');

I only added TARGET_ARCH='x86'. Is that wrong or should I set the target arch someplace else? The LNK 1112 error still occurs.

It would be great, if somebody could me help. :)

Community
  • 1
  • 1
salted
  • 304
  • 1
  • 4
  • 17
  • You should make your solution an answer and select it as the accepted answer. Otherwise it seems that the question was not actually solved (still showing at the "unanswered" section). – George Marques Sep 10 '15 at 04:10

1 Answers1

2

There is nothing to change in SConstruct, but the right compiler version is needed. So go to the directory C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts and call the VS2013 x86 Native Tools command line. Then it works. :)

salted
  • 304
  • 1
  • 4
  • 17
  • 1
    Note that this is because godot's SCons implementation is copying PATH info from the shell environment it is run in rather than allowing SCons to detect and use the appropriate installed Visual Studio. – bdbaddog Sep 22 '15 at 00:31