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: Jiva DeVoe
Subject: Re: GNUstep-make and C++ projects...
Date: Sun, 2 Mar 2008 00:28:46 -0700

I'll bet that's the problem, sorry for the bother.  I'm running 1.13

I'll download the source and give it a shot.  Thanks.

On Mar 1, 2008, at 5:44 PM, Nicola Pero wrote:

Which version of gnustep-make are you using ?  You may want to try
2.0.4 (the latest stable release). ;-)

ftp://ftp.gnustep.org/pub/gnustep/core/gnustep-make-2.0.4.tar.gz

Thanks


-----Original Message-----
From: Jiva DeVoe <address@hidden>
Sent: Sunday, March 2, 2008 12:43am
To: address@hidden
Cc: Helge Hess <address@hidden>, GNUstep Developers <address@hidden >
Subject: Re: GNUstep-make and C++ projects...

Here's the output of that command:

$ make CC=g++ messages=yes
Making all for ctool LogTest...
g++  -rdynamic       -o shared_obj/LogTest \
                 \
               -L/home/jiva/GNUstep/Library/Libraries -L/usr/local/lib/
GNUstep/Local/Library/Libraries -L/usr/local/lib/GNUstep/Network/
Library/Libraries -L/usr/lib/GNUstep/System/Library/Libraries -lm
/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

If you look there, mine is missing the source.cc in there.  Maybe
something with my makefile... again here that is:

include $(GNUSTEP_MAKEFILES)/common.make

CTOOL_NAME = LogTest
LogTest_CC_FILES = source.cc

include $(GNUSTEP_MAKEFILES)/ctool.make


I'm using the debian packages... could it be something broken with
those?

BTW, I notice I *have* to name my Makefile GNUmakefile... is it
possible to just name it Makefile and have it work?

On Mar 1, 2008, at 11:10 AM, Nicola Pero wrote:

Thanks Jiva

here is what I get --

address@hidden C++]$ make messages=yes CC=g++
This is gnustep-make 2.0.4. Type 'make print-gnustep-make-help' for
help.
Making all for ctool LogTest...
cd .; \
      /usr/GNUstep/System/Library/Makefiles/mkinstalldirs ./obj
g++ source.cc -c \
            -MMD -MP -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -
DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGNUSTEP_BASE_LIBRARY=1 -
D_REENTRANT -fPIC -g -Wall -DDEBUG -fno-omit-frame-pointer -DGSWARN -
DGSDIAGNOSE -Wno-import -g -I. -I/home/nicola/GNUstep/Library/
Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/System/
Library/Headers \
             -o obj/source.o
g++  -rdynamic       -o obj/LogTest \
            ./obj/source.o \
                 -L/home/nicola/GNUstep/Library/Libraries -L/usr/
GNUstep/Local/Library/Libraries -L/usr/GNUstep/System/Library/
Libraries      -lm
address@hidden C++]$

And then the tool works.  Do you get the same output ?  My g++ is
4.1.2.
Is your g++ the same version (it looks like from your output) ?

Thanks


-----Original Message-----
From: Jiva DeVoe <address@hidden>
Sent: Saturday, March 1, 2008 5:47pm
To: Helge Hess <address@hidden>
Cc: address@hidden, GNUstep Developers <address@hidden

Subject: Re: GNUstep-make and C++ projects...

So, I tried the make CC=g++ and I got:

$ make CC=g++
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


On Mar 1, 2008, at 6:19 AM, Helge Hess wrote:

On 01.03.2008, at 12:16, Nicola Pero wrote:
make CC=g++

Hm, is there a special CC variable for CPP files? I think I wondered
about that.

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.


I qualify, unfortunately ;-) I also tried using gstep-make (on
MacOSX) to compile a C++ project, but failed for reasons I don't
remember anymore :-)

I think activating C++ linking on non-empty CC_FILES should be OK.
However, then CC_FILES should support compilation of .c files using g
++. Eg:
CC_FILES = \
 a.cpp \
 b.c

If all that would work as-is on Windows to produce DLLs and such, it
would be awesome! :-)
Further it would be very nice if one could use the VS C++ compiler
instead of g++. But that probably works already (CC=vcc++ or
whatever)

Hm, sweet. I think I give it another try today and see what was
wrong with using gsmake for me.

Thanks,
Helge
--
Helge Hess
http://www.helgehess.eu/


_______________________________________________
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]