[CMake] Changing the default compiler of VC++

Hendrik Sattler post at hendrik-sattler.de
Mon May 4 10:10:21 EDT 2009


Zitat von Andreas Pakulat <apaku at gmx.de>:
> On 04.05.09 17:56:14, ankit jain wrote:
>> Thanks Andreas for your reply. I already build the code using mks. now i
>> want to build the code using cl/VC++. since it gives lots of errors of not
>> founding fiels like strings.h unistd.h
>
> Then you need to fix those errors, either your environment is incorrectly
> setup (make sure to use the Visual studio command prompt link to get a
> properly setup command prompt from where you can run cmake) or the
> compiler lacks some of these headers. In the latter case you'll have to
> adjust your code and use whatever facilities cl provides. However strings.h
> and unistd.h are both part of VC++ so I guess its the broken environment.

unistd.h and strings.h are _not_ part of MSVC. They both come with  
mingw32 and other gcc compile environments for windows but not MSVC.
You have to add your own replacement header files for that case or  
only use them conditionally.

HS




More information about the CMake mailing list