[CMake] Changing the default compiler of VC++

Andreas Pakulat apaku at gmx.de
Mon May 4 10:24:29 EDT 2009


On 04.05.09 16:10:21, Hendrik Sattler wrote:
> 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.

Heh, misread strings.h as string.h and I wasn't aware unistd.h is not part
of VC as its standard POSIX (and MSVC does have most posix stuff).

Andreas

-- 
Give him an evasive answer.


More information about the CMake mailing list