discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Problem with GNUstep and Objective-C++


From: Mike Simmons
Subject: Re: Problem with GNUstep and Objective-C++
Date: Mon, 4 May 2009 14:52:32 -0500

Hi Lucas,

I tried your suggestion, but no luck. Make still fails.

When evaluated, CC turns out to be g++, but the same make failure occurs if I force make to use gcc.

I'm running Suse SLES 10, and the g++ compiler version is 4.1.2, if that makes any difference.

Any other suggestions? I know it's probably something simple, but the solution isn't apparent.

Thanks,
Mike

On May 4, 2009, at 12:52 PM, Lucas Schnorr wrote:

Hello Mike,

try to put this:
CC=$(CXX)
just after the first include on your GNUmakefile
to make it work with objective-c++.

Lucas


On Mon, May 4, 2009 at 12:48, Mike Simmons <jmichaelsimmons@gmail.com> wrote:
Hello,

I cannot seem to get Objective-C++ to compile properly with GNUstep. Here's
the background.

First (of course) I successfully installed the core GNUstep components. Then, following the "getting started" tutorial, I created a source file
called source.m, as below:
---------------------
#import <Foundation/Foundation.h>

int
main (void)
{
  NSLog (@"Executing");
  return 0;
}
---------------------

I then created a makefile using the tutorial's example (below):
---------------------
include $(GNUSTEP_MAKEFILES)/common.make
TOOL_NAME = LogTest
LogTest_OBJC_FILES = source.m
include $(GNUSTEP_MAKEFILES)/tool.make
---------------------

The sample program naturally compiled and ran with no problems.
So then I wanted to try the same program as an Objective-C++ program. I simply changed the name of the source file to source.mm, and changed a line
in the make file as below:
---------------------
LogTest_OBJCC_FILES = source.mm
---------------------

The make fails. I've tried naming source.mm as source.m and source.cpp but
that does not work either. I get the following error information:
---------------------
Making all for tool LogTest...
Compiling file source.mm ...
g++: source.mm: linker input file unused because linking not done
Linking tool LogTest ...
g++: ./obj/source.mm.o: No such file or directory
make[1]: *** [obj/LogTest] Error 1
make: *** [LogTest.all.tool.variables] Error 2
---------------------

Any help would be most appreciated -- I really need to use Objective-C++
with GNUstep!

Thanks,
Mike



_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnustep





--
Lucas Schnorr - http://www.inf.ufrgs.br/~lmschnorr





reply via email to

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