I am having some problems building a 64 bit version of my application using the NMake generator on 64 bit Windows with Visual Studio 8.0.

I am using the Microsoft Platform SDK command prompts that can be opened through the start menu. I can use the "Visual Studio 8 2005" generator just fine. However, when I am in an IA64 environment I get this:

<snip>
C:\build\x64>cmake -G"NMake Makefiles" C:\svn\trunk
-- Check for CL compiler version
-- Check for CL compiler version - 1310
-- Check if this is a free VC compiler
-- Check if this is a free VC compiler - no
-- Check CL platform
-- Check CL platform - 64 bit
-- Check for working C compiler: cl
-- Check for working C compiler: cl -- broken
The C compiler "cl" is not able to compile a simple test program.
It fails with the following output:
       nmake -f CMakeFiles\cmTryCompileExec.dir/build.make /nologo -L
       CMakeFiles\cmTryCompileExec.dir\build
Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.obj
C:\PROGRA~1\MIFD68~1\Bin\Win64\CL.EXE @C:\DOCUME~1\JRODRI~1.PSS\LOCALS~
1\Temp\nm4288.tmp
cl : Command line warning D4002 : ignoring unknown option '/GZ'
testCCompiler.c
Linking C executable cmTryCompileExec.exe
"C:\Program Files\CMake 2.4\bin\cmake.exe" -P CMakeFiles\cmTryCompileExe
c.dir\cmake_clean_target.cmake
C:\PROGRA~1\MIFD68~1\Bin\Win64\CL.EXE /nologo @C:\DOCUME~1\JRODRI~1.PSS
\LOCALS~1\Temp\nm4289.tmp
cl : Command line warning D4002 : ignoring unknown option '/GZ'
LINK : warning LNK4012: invalid value 'x64', must be 'AM33, ARM, EBC, IA64, M32R , MIPS, MIPS16, MIPSFPU, MIPSFPU16, MIPSR41XX, SH3, SH3DSP, SH4, SH5, THUMB, or
X86'; option ignored
LINK : fatal error LNK1181: cannot open input file 'odbc32.lib'
NMAKE : fatal error U1077: 'C:\PROGRA~1\MIFD68~1\Bin\Win64\CL.EXE' : return code
'0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft SDK\Bin\Win64\nmake.exe"
' : return code '0x2'
Stop.

CMake will not be able to correctly generate this project.
-- Configuring done
</snip>






When I am in an AMD64 environment I get something similar:

<snip>
C:\build\x64>cmake -G"NMake Makefiles" C:\svn\trunk
-- Check for CL compiler version
-- Check for CL compiler version - 1400
-- Check if this is a free VC compiler
-- Check if this is a free VC compiler - no
-- Check CL platform
-- Check CL platform - 64 bit
-- Check for working C compiler: cl
-- Check for working C compiler: cl -- broken
The C compiler "cl" is not able to compile a simple test program.
It fails with the following output:
       nmake -f CMakeFiles\cmTryCompileExec.dir/build.make /nologo -L
       CMakeFiles\cmTryCompileExec.dir\build
Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.obj
C:\PROGRA~1\MIC977~1\Bin\win64\x86\AMD64\cl.exe @C:\DOCUME~1\JRODRI~1.P
SS\LOCALS~1\Temp\nm428D.tmp
testCCompiler.c
Linking C executable cmTryCompileExec.exe
"C:\Program Files\CMake 2.4\bin\cmake.exe" -P CMakeFiles\cmTryCompileExe
c.dir\cmake_clean_target.cmake
C:\PROGRA~1\MIC977~1\Bin\win64\x86\AMD64\cl.exe /nologo @C:\DOCUME~1\JR
ODRI~1.PSS\LOCALS~1\Temp\nm428E.tmp
LINK : warning LNK4012: invalid value 'x64', must be 'AM33, AMD64, ARM, CEE, EBC , IA64, M32R, MIPS, MIPS16, MIPSFPU, MIPSFPU16, MIPSR41XX, SH4, SH5, THUMB, or X
86'; option ignored
testCCompiler.obj : error LNK2001: unresolved external symbol _RTC_Shutdown
testCCompiler.obj : error LNK2001: unresolved external symbol _RTC_InitBase
cmTryCompileExec.exe : fatal error LNK1120: 2 unresolved externals
NMAKE : fatal error U1077: 'C:\PROGRA~1\MIC977~1\Bin\win64\x86\AMD64\cl.exe' : r
eturn code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Platform SDK\Bin\nmake.e
xe"' : return code '0x2'
Stop.


CMake will not be able to correctly generate this project.
-- Configuring done
</snip>



and from a 32 or 64 bit environment, I cannot use the Visual Studio generator at all:

<snip>
C:\build\x64>cmake -G"Visual Studio 8 2005 Win64" C:\svn\trunk
-- Check for working C compiler: cl
-- Check for working C compiler: cl -- broken
The C compiler "cl" is not able to compile a simple test program.
It fails with the following output:

Microsoft (R) Visual Studio Version 8.0.50727.42.
Copyright (C) Microsoft Corp 1984-2005. All rights reserved.

The project consists entirely of configurations that require support for platfor
ms which are not installed on this machine. The project cannot be loaded.
The project consists entirely of configurations that require support for platfor
ms which are not installed on this machine. The project cannot be loaded.
The project consists entirely of configurations that require support for platfor
ms which are not installed on this machine. The project cannot be loaded.
The project consists entirely of configurations that require support for platfor
ms which are not installed on this machine. The project cannot be loaded.
Invalid project

Use:
devenv  [solutionfile | projectfile | anyfile.ext]  [switches]

The first argument for devenv is usually a solution file or project file.
You can also use any other file as the first argument if you want to have the
file open automatically in an editor. When you enter a project file, the IDE
looks for an .sln file with the same base name as the project file in the
parent directory for the project file. If no such .sln file exists, then the
IDE looks for a single .sln file that references the project. If no such single .sln file exists, then the IDE creates an unsaved solution with a default .sln
file name that has the same base name as the project file.

Command line builds:
devenv solutionfile.sln /build solutionconfig [ /project projectnameorfile [ /pr
ojectconfig name ] ]
Available command line switches:

/Build          Builds the solution or project with the specified solution
               configuration. For example "Debug". If multiple platforms
are possible, the configuration name must be enclosed in quotes
               and contain platform name. For example: "Debug|Win32".
/Clean          Deletes build outputs.
/Command        Starts the IDE and executes the command.
/Deploy         Builds and then deploys the specified build configuration.
/Edit           Opens the specified files in a running instance of this
               application. If there are no running instances, it will
               start a new instance with a simplified window layout.
/LCID           Sets the default language in the IDE for the UI.
/Log            Logs IDE activity to the specified file for troubleshooting.
/NoVSIP         Disables the VSIP developer's license key for VSIP testing.
/Out            Appends the build log to a specified file.
/Project        Specifies the project to build, clean, or deploy.
               Must be used with /Build, /Rebuild, /Clean, or /Deploy.
/ProjectConfig Overrides the project configuration specified in the solution configuration. For example "Debug". If multiple platforms are
               possible, the configuration name must be enclosed in quotes
               and contain platform name. For example: "Debug|Win32".
               Must be used with /Project.
/Rebuild        Cleans and then builds the solution or project with the
               specified configuration.
/ResetAddin Removes commands and command UI associated with the specified Ad
d-in.
/ResetSettings  Restores the IDE's default settings, optionally resets to
               the specified VSSettings file.
/ResetSkipPkgs  Clears all SkipLoading tags added to VSPackages.
/Run            Compiles and runs the specified solution.
/RunExit Compiles and runs the specified solution then closes the IDE.
/SafeMode       Launches the IDE in safe mode loading minimal windows.
/Upgrade        Upgrades the project or the solution and all projects in it.
A backup of these files will be created as appropriate. Please
               see Help on 'Visual Studio Conversion Wizard' for more
               information on the backup process.

Product-specific switches:

/debugexe       Open the specified executable to be debugged. The
               remainder of the command line is passed to this
               executable as its arguments.
/useenv         Use PATH, INCLUDE, LIBPATH, and LIB environment variables
               instead of IDE paths for VC++ builds.

To attach the debugger from the command line, use:
       VsJITDebugger.exe -p <pid>


CMake will not be able to correctly generate this project.
-- Configuring done
</snip>



What am I doing wrong?

--
Jorge Rodriguez



_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to