[Top][All Lists]

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

c++ compilation within objc framework

From: Stephen Brandon
Subject: c++ compilation within objc framework
Date: Tue, 11 Sep 2001 11:16:52 +0100


Working on a set of frameworks that have been until now 100% ObjC, 
compilation has been fine on MacOSX and GNUstep.

But we've just added some c++ classes, with some bridge code to make the 
classes available from ObjC. This works just fine in ProjectBuilder (MacOSX) 
but I can't find any way to get the cpp files to compile on GNUstep.

I've never tried to extend the makefile system before now and don't know 
where to start. I've got a reasonable idea of how make/gmake works... but 
it's a pretty complex system in there.

As a stopgap measure, is there an easy way to make a rule within my 
GNUmakefile to compile cpp files? How would I then ensure the the object 
files created are linked in with the other ObjC files?

I have tried putting this into my GNUmakefile at various locations:

$(GNUSTEP_OBJ_DIR)/%${OEXT} : %.cpp
        $(CC) $< -c $(ALL_CPPFLAGS) $(ALL_OBJCFLAGS) -o $@

But it has no effect whatsoever (still get "No rule to make target...    
...cpp" message).

Any help much appreciated!

Stephen Brandon

reply via email to

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