[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: GNUstep Make and C++
From: |
Nicola Pero |
Subject: |
RE: GNUstep Make and C++ |
Date: |
Tue, 3 Jun 2008 19:07:58 +0200 (CEST) |
> I'm trying to persuade GNUstep Make to build a project which includes
> some C++ files. Apparently the ${TOOLNAME}_CXX_FILES variable is not
> recognised, so can someone suggest the correct solution? The only
> references I can find say you should set set CC=${CXX} but this is not
> a good solution since in some build configurations I need to compile C
> files with a C compiler and C++ files with a C++ compiler in the same
> project. If I try using ${TOOLNAME}_CC_FILES then it seems to
> recognise the macro but then complains that there is no rule to make
> the .o file. Do I need to include something to get the C++ suffix rule?
You need gnustep-make v2.0.5 (or trunk). :-)
Here is a tiny example (posted by Jiva DeVoe in March) which works for me --
----GNUmakefile:
include $(GNUSTEP_MAKEFILES)/common.make
CTOOL_NAME = LogTest
LogTest_CC_FILES = source.cc
include $(GNUSTEP_MAKEFILES)/ctool.make
----source.cc:
#include <iostream>
int main (int argc, char *argv)
{
std::cout << "foo" << std::endl;
return 0;
}
If it doesn't work for you, check your gnustep-make version (you need v2.0.5
or trunk) then your config.make (it should include CXX=g++ or similar) - if
config.make doesn't include a definition for CXX, you may want to reconfigure
gnustep-make - or pass CXX on the command-line as in 'make CXX=g++' (or set
it in your environment) ?
If all else fails, let me know (please include the output of 'make
messages=yes'
with problem reports). ;-)
Thanks