[CMake] Re: [vtkusers] error: cmake + free optimizing compiler from .net framework SDK --- x86 conflicts with x64
Bill Hoffman
bill.hoffman at kitware.com
Wed Dec 6 16:03:47 EST 2006
Weiguang Guan wrote:
> Hi Mathieu,
>
> I am working directly on Windows XP rather than on Cygwin layer. I
> think this might be a cmake issue, because the error message box
> appears after I hit the "Configure" button of CMake, and the same
> error message pops up when configuring an ITK build with cmake.
>
> The error message seems coming from CMakeTestCCompiler.cmake, in which
> a simple c program (see below) is generated on the fly and compiled.
>
> #ifdef __cplusplus
> # error "The CMAKE_C_COMPILER is set to a C++ compiler"
> #endif
> #include <stdio.h>
> #if defined(__CLASSIC_C__)
> int main(argc, argv)
> int argc;
> char* argv[];
> #else
> int main(int argc, char* argv[])
> #endif
> { printf("%s\\n", argv[0]); return argc-1;}
>
> I manually saved it into a file and got it compiled and linked. It
> worked fine. Can anyone explain why cmake thinks "it is not able to
> compile a simple test program"?
>
My guess is that somehow the check size of void* failed to run
correctly, and cmake thinks you are on a 64 bit machine. You can run
cmake (not CMakeSetup) from the command line and use --debug-trycompile
to get cmake to leave the try compile directories and not delete them.
Also, you might want to try a simple hello world project instead of ITK
or VTK.
add_executable(foo foo.c)
-Bill
More information about the vtkusers
mailing list