[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: c++ compilation within objc framework
From: |
Nicola Pero |
Subject: |
Re: c++ compilation within objc framework |
Date: |
Sat, 15 Sep 2001 14:16:18 +0100 (BST) |
Hi Stephen,
I implemented support for C++ files in sort-of-the way you describe -
just update your gnustep-make from CVS and it should work: you can now
define xxx_CC_FILES to be a list of C++ files, and they should
automatically be compiled and linked into your
application/tool/library/whatever.
If you need some special flags for the C++ compiler, you can put them
into ADDITIONAL_CCFLAGS.
Feedback is strongly welcome!
One last remark - the thing is alpha so the API might change in the
next future as it was just added. If you use it, please keep an eye
in particular on variable names, which are the most likely targets of
changing.
Anyway, here is an example:
GNUmakefile:
============
include $(GNUSTEP_MAKEFILES)/common.make
TOOL_NAME = HelloWorld
HelloWorld_CC_FILES = test.cpp
HelloWorld_OBJC_FILES = test1.m
ADDITIONAL_TOOL_LIBS = -lstdc++
include $(GNUSTEP_MAKEFILES)/tool.make
test1.m:
========
#include <Foundation/Foundation.h>
void test (void)
{
NSLog (@"Hello from gnustep");
}
test.cpp:
=========
#include <iostream>
extern "C" { void test (void); }
int main (void)
{
std::cout << "Hello world!\n";
test ();
return 0;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: c++ compilation within objc framework,
Nicola Pero <=