[CMake] CMake: C-code and Visual Studio 2005 problem.
Andrew Maclean
andrew.amaclean at gmail.com
Wed May 3 23:32:47 EDT 2006
1) The extension of the source files is .c
2) Test COnly works Ok. It compiles and links Ok.
I am using the gpsbabel source files. If you like you can download them from
the gpsbabel site and I can send you my CMakeLists.txt file.
Andrew
-----Original Message-----
From: William A. Hoffman [mailto:billlist at nycap.rr.com]
Sent: Thursday, 4 May 2006 13:11
To: a.maclean at cas.edu.au; cmake at cmake.org
Subject: Re: [CMake] CMake: C-code and Visual Studio 2005 problem.
At 10:29 PM 5/3/2006, Andrew Maclean wrote:
>I am having difficulty linking pure c-code using CMake and Visual Studio
>2005.
>
>I have set the following:
>PROJECT ( gpsbabel C )
>
>So in theory the compiler should be set for C code only. However this does
>not seem to be the case, because in the [properties] [C/C++] [advanced]
page
>/TP is set indicating that C++ only is being compiled. If I set this to
>default or to /TC, it seems to have no effect.
>
>
>I am pretty sure that this is a CMake/Visual Studio 2005 problem because I
>converted an existing gpsbabel VS7.1 to VS8.0 and it works Ok after adding
>in some missing files to the project.
>
>
>The CMakeLists.txt file works Ok under Linux.
>
>
>Can anyone offer some comments/help here. If so I can make available the
>CMakeLists.txt file that I am using.
>
>Thanks in advance for any help.
>
>By the way I am using CMake 2.5 - development (last Sunday's version). The
>Linux version is a slightly more recent one.
>
>Andrew
>
So, it could be that someone changed the settings in your VS installation so
that .c files are considered C++ and not C. What is the extension of the
source
files you are compiling? There is a test in cmake called Conly. If you
build
from source, try building that project Tests/COnly. It should be the c
compiler.
-Bill
More information about the CMake
mailing list