I tried to compile the source of ROOT v5.30.02 using Visual Studio 2010 Express into 64-bit binaries on Windows 7, but compilation fails with the message:[quote]C:\Program Files\Microsoft SDKs\Windows\v7.1\include\winnt.h(135): fatal error C1189: #error : “No Target Architecture”[/quote].
Looking at winnt.h, this error is issued by the preprocessor if none of the macros indicating the architecture is defined:
127 #if defined(_WIN64)
129 #if defined(_AMD64_)
130 #define PROBE_ALIGNMENT( _s ) TYPE_ALIGNMENT( DWORD )
131 #elif defined(_IA64_)
132 #define PROBE_ALIGNMENT( _s ) (TYPE_ALIGNMENT( _s ) > TYPE_ALIGNMENT( DWORD ) ? \
133 TYPE_ALIGNMENT( _s ) : TYPE_ALIGNMENT( DWORD ))
135 #error "No Target Architecture"
136 #endif. But according to Visual C++ documentation, the macro is supposed to be defined by the compiler.
I configured ROOT using CMake and chose “Visual Studio 2010 Win64” as the compiler. If I choose “Visual Studio 2010” instead, the compilation completes without any problem.
This “No Target Architecture” error has been reported on several websites without solution. It may sound like Visual Studio problem, but I successfully configured and compiled some other software packages with the same way (CMake + Visual Studio WIN64).
I am wondering if someone succeeded in compiling ROOT into 64-bit code using Visual Studio.