News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

CMake and Visual Studio

Started by flatron, July 19, 2012, 03:57:17 PM

Previous topic - Next topic

flatron

Hello,

I create my first Code::Block project with cmake. I used the command 'cmake -G"CodeBlocks - Nmake Makefiles" ...'
When I try to compile my program I have this error:

Microsoft (R) Program Maintenance Utility Version 8.00.50727.42
Copyright (C) Microsoft Corporation. Tous droits r
[  2%] Building C object CMakeFiles/test.dir/test.c.obj
clÿ: Ligne de commande warning D9025ÿ: substitution de '/MTd' par '/MT'
clÿ: Ligne de commande warning D9025ÿ: substitution de '/Od' par '/O2'
NMAKE : fatal error U1077: 'C:\PROGRA~2\MICROS~2\VC\bin\amd64\cl.exe' : code retour '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin\nmake.exe"' : code retour '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin\nmake.exe"' : code retour '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin\nmake.exe"' : code retour '0x2'
Stop.
test.c
...\include\test.h(37) : fatal error C1083: Impossible d'ouvrir le fichier includeÿ: 'windows.h'ÿ: No such file or directory


In 'Global compiler settings', tab 'Search directories' I have this:
C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include
C:\Program Files (x86)\Microsoft Visual Studio 8\VC\ATLMFC\INCLUDE
C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include

I don't understand why it can't find the windows.h header and why I have the chart 'ÿ' (maybe it's the problem).

PS: When I try nmake in command it work

Thanks ofr your help.
Flatron

Jenna

Cmake creates a makefile-based projects.
The make-exe does not know anything about the settings you have made inside the global compiler settings, these settings are only used, if C::B's own build-system is used.
So it's most likely an issue with the cmake-created project-file.

flatron