0

I have a 32-bit VC++ application, which I have recompiled as 64-bit application as I want to use it on a 64-bit OS.
Code-wise no change is required as it is compatible for both 32-bit and 64-bit.
Hence, I just did 3 changes while (porting) compiling in 64-bit.

1) In VS2008 (drop down menu in the top) I changed from "Win32" to "x64".
2) In the configuration manager, I ensured that the project I'm compiling is changed to "x64".
3) In the project properties --> Linker ->Advanced options-> machine Type :: change the value to MACHINEx64.

Now after having given the background, coming to actual problem when I compile the project in 32-bit mode, it's compiling successfully. But when I compile the project as x64 by doing the above mentioned changes, it's giving the below error.

fatal error C1083: Cannot open include file: 'atltime.h': No such file or directory

How do I fix this problem? I'm I missing any libraries? But I used the same settings for linker as in "32bit mode". i.e pointing to the same set of *.lib files. (since all the libraries are statically linked, this application generates only an EXE).

PS: Point to note is that the VS in my system is installed in C:\ProgramFiles(x86) and not in C:\ProgramFiles. So I see that "atltime.h" header file is in

"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include"

Is this can be any reason that this header file atltime.h is not recognized while building the code in 64-bit mode?

Thanks in advance.

codeLover
  • 3,720
  • 10
  • 65
  • 121
  • Strangely, that does not work. Maybe you missed something. I do not know is article useful. But try to read. Seven Steps of Migrating a Program to a 64-bit System - http://www.viva64.com/en/a/0042/ –  Aug 22 '13 at 16:09

1 Answers1

0

Have you tried adding the include path to your 64-bit project directory settings?

  • Yes, I tried including the path "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include" to the "atltime.h" in the project properties -> General ->Additional include directories. Now the earlier error went off and I'm getting the error which I have been struggling for a long time "fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'" – codeLover Aug 22 '13 at 15:24
  • Under Linker -> Advanced -> Target Machine, change to x64 – markiemooster Aug 22 '13 at 15:31
  • See http://stackoverflow.com/questions/3563756/fatal-error-lnk1112-module-machine-type-x64-conflicts-with-target-machine-typ – markiemooster Aug 22 '13 at 15:34