gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: GNUstep-make and C++ projects...


From: Nicola Pero
Subject: RE: GNUstep-make and C++ projects...
Date: Sat, 1 Mar 2008 12:16:11 +0100 (CET)

The easiest solution might be to use g++ instead of gcc to link C++ files.

make CC=g++

works for me.

Presumably the alternative is to get the right C++ linking flags from gcc
and use them ?

It would be nice if gnustep-make was to automatically do all of this.  Not
that sure how to decide when to use C++ linking (is it when only CC_FILES
are non-empty and all the other xxx_FILES are empty ?) and how to best automate
it.  Suggestions from C++ users are welcome.

Thanks


-----Original Message-----
From: Jiva DeVoe <address@hidden>
Sent: Saturday, March 1, 2008 12:54am
To: address@hidden
Subject: GNUstep-make and C++ projects...

Is it possible to use GNUstep-make for just plain old C++ projects  
with no other involvement with GNUstep?

I tried making a ctool, and I get linker errors when I try.

My stuff looks like this:


include $(GNUSTEP_MAKEFILES)/common.make

CTOOL_NAME = LogTest
LogTest_CC_FILES = source.cc

include $(GNUSTEP_MAKEFILES)/ctool.make



#include <iostream>

int main (int argc, char *argv)
{
     std::cout << "foo" << std::endl;
     return 0;
}


and the error I get is:

Making all for ctool LogTest...
  Linking ctool LogTest ...
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/crt1.o: In function  
`_start':
../sysdeps/i386/elf/start.S:115: undefined reference to `main'
collect2: ld returned 1 exit status
make[1]: *** [shared_obj/LogTest] Error 1
make: *** [LogTest.all.ctool.variables] Error 2



_______________________________________________
Gnustep-dev mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/gnustep-dev






reply via email to

[Prev in Thread] Current Thread [Next in Thread]