[CMake] cmake vista tutorial?

Craig Miller craig.miller at spatialminds.com
Wed Sep 3 14:36:57 EDT 2008


Yep, a Visual Studio 2005 target works.


The output of rc /? is:

c:\users\craig\nav\maps\basemaps\install>rc /?

Microsoft (R) Windows (R) Resource Compiler Version 5.2.3690.0
Copyright (C) Microsoft Corporation.  All rights reserved.

Usage:  rc [options] .RC input file
Switches:
   /r    Emit .RES file (optional)
   /v    Verbose (print progress messages)
   /d    Define a symbol
   /u    Undefine a symbol
   /fo   Rename .RES file
   /l    Default language ID in hex
   /i    Add a path for INCLUDE searches
   /x    Ignore INCLUDE environment variable
   /c    Define a code page used by NLS conversion
   /w    Warn on Invalid codepage in .rc (default is an error)
   /y    Don't warn if there are duplicate control ID's
   /n    Append null's to all strings in the string tables.
Flags may be either upper or lower case


c:\users\craig\nav\maps\basemaps\install>


When I run the CMakeSetup via the Visual Studio command prompt, select nmake
as an output option, and press configure I get the same error message:

CMake Error:  your RC compiler:  "CMAKE_RC_COMPILER-NOTFOUND" was not found.
Please set CMAKE_RC_COMPILER to a valid compiler path or name.

Craig



-----Original Message-----
From: Bill Hoffman [mailto:bill.hoffman at kitware.com] 
Sent: Wednesday, September 03, 2008 10:58 AM
To: Craig Miller; cmake
Subject: Re: [CMake] cmake vista tutorial?

Craig Miller wrote:
> I'm running Visual Studio 2005 w/ SP1.
> 

OK, so lets start from the beginning...  Create a very simple project:

---CMakeLists.txt------
cmake_minimum_required (VERSION 2.6)
project(bar)
add_library(foo foo.c)
---------

----foo.c----
int foo()
{
return 1;
}
--------


Put those files in a directory say c:\bar

Now run CMakeSetup

- Select the source directory c:\bar
- Select the binary directory c:\bar-build
- Click Configure
- Select the Visual Studio 8 2005 generator and configure.  This will not
use nmake but will test your compiler install.
- Do you get any errors?
- Load the bar.sln file from c:\bar-build into visual studio and build
- Do you get errors?


If that all works try nmake:

- Run Start-> All Programs -> Microsoft Visual Studio 2005 -> Visual 
Studio Tools -> Visual Studio 2005 Command Prompt
- From the command line of the prompt you just started run:
   rc /?
   What is the output?

- From the command line of the prompt you just started run:
c:\Program Files\CMake 2.6\bin\CMakeSetup.exe
- Select the source directory c:\bar
- Select the binary directory c:\bar-build-nmake
- Click configure
- Click OK
- run nmake in c:\bar-build-nmake

If that does not work please post errors.  There are lots of folks using 
similar setups as you.  Right now I suspect a bad installation of your 
compiler.  Did you do the default installation?  Or did you customize 
the installation?

-Bill



More information about the CMake mailing list