Building on windows x64

  • Anonymous - 2013-02-19


    I am working on a win 7 x 64 system. Waffles do build on x32 platforms but on x64 all the #ifdef WINDOWS lines go on the false branch and try to include the nonexistent # include <alloca.h> ,#include <unistd.h>,#include <termios.h> headers:

    Error 8 error C1083: Cannot open include file: 'alloca.h': No such file or directory

    I tried it on debug as well as on release but i get the same issue and I can not work on the x32 platform. Is there a quick fix for this? Am i doing something wrong?

    Thank you,

  • Mike Gashler

    Mike Gashler - 2013-02-19

    You can open any of the .vcxproj files in a text editor and search for the string "PreprocessorDefinitions". Make sure "WINDOWS" is defined for 64-bit configurations.

    If you prefer to work with the GUI, right click on one of the projects in Solution Explorer, click properties, Configuration Properties->C/C++->Preprocessor, and see if "WINDOWS" is among the "Preprocessor Definitions". (I do not know whether there is some easy way to tell Visual Studio to edit them all in one shot--that would be nice.)

    I don't think a 64-bit configuration was included with Waffles, so I suspect the problem is that your 64-bit version of Visual Studio did not copy the preprocessor definitions over from the 32-bit configuration when it automatically generated a 64-bit configuration. I don't really know how to fix that. If you determine that there is some change I can make to my .vcxproj files that will cause 64-bit Visual Studio to do this properly, I'd love to know about it.

    Good luck!

  • Anonymous - 2013-02-20

    Yes you suspected wright: When I was creating my x64 platform VS was not copying the the preprocessed definitions over from the 32-bit configuration. So by checking option: "copy settings form Win32" in the popup window where the new platform is defined solves the issue.
    But now i have a link issue:error LNK1104: cannot open file 'GClasses_DebugVersion.lib'

    Any ideas about it?


  • Anonymous - 2013-02-20

    Mike i think the easiest way to make your project compile on any platform is to build a CMake make list so any user can compile the project according to their platform

  • Mike Gashler

    Mike Gashler - 2013-02-20

    In Solution Explorer, right-click on the app giving the linker error, then click on Project Dependencies. Make sure GClasses is checked. (All of the Waffles apps are wrappers around the GClasses library, so all of them should depend on the GClasses project.)

    Switching to CMake sounds like a good idea. I don't have the time for that change right now, but I hope to get to it eventually.

  • Anonymous - 2014-06-07

    To build waffles for x64 I made these steps (I don't know if some of them is necessary):
    0) (I think it's not necessary) Delete all projects besides GClasses
    1) Set Release and x64 in Configuration Manager (if you have not x64 line I think you should download x64 compiler for VS2010)
    2) Set (Right Click on project name "GClasses" -> Properties -> Librarian -> General -> Target Machine -> machine x64)
    3) Remove WIN32 from (Right Click on project name "GClasses" -> Properties -> C/C++ -> Preprocessor -> Preprocessor Definitions)
    4) I recommend set another name for lib (e.g. GClasses64.lib) (Right Click on project name "GClasses" -> General -> Target Name) change $(ProjectName) to $(ProjectName)64

    p.s. I change string in Matrix.cpp from
    size_t col = strtoull(szTok, (char**)NULL, 10);
    size_t col = (size_t)_strtoui64(szTok, (char**)NULL, 10);<c ode="">



Cancel  Add attachments