Author Topic: CMake and Visual Studio  (Read 6351 times)

Offline flatron

  • Single posting newcomer
  • *
  • Posts: 2
CMake and Visual Studio
« on: July 19, 2012, 03:57:17 pm »
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

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: CMake and Visual Studio
« Reply #1 on: July 19, 2012, 04:08:19 pm »
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.

Offline flatron

  • Single posting newcomer
  • *
  • Posts: 2
Re: CMake and Visual Studio
« Reply #2 on: July 19, 2012, 05:11:22 pm »
ok thanks