[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
GNUstep Base and Objective-C++
From: |
Oliver Langer |
Subject: |
GNUstep Base and Objective-C++ |
Date: |
Tue, 30 May 2006 10:36:08 +0200 |
Hi GSsteppers,
i try to use Objective-C++ since i need to wrap objc objects via
c++ objects within my project. To do so i use
- gcc version 4.1.0
- gnustep base 1.10.3
- gnustep make 1.10
- linux
Now i have the following questions:
1) Which is the best practice to use .mm files in GNUmake files?
I simply use the usual GNUmakefile syntax in order to create my tool and
overwrite CC and LD as follows
CC=gcc -x objective-c++
LD=g++
This works fine so far but is it the recommended way? Has anyone
been used objc++ in conjunction with GNUmake files so far and if so, how?
2) Do the current GS sources compile using objc++ ?
I encountered minor syntax errors with gnustep base 1.10.3 while including
Foundation.h.
2.1) Existing code in NSGeometry.h, line 120:
-----
typedef enum _NSRectEdge NSRectEdge;
enum _NSRectEdge
{
NSMinXEdge,
NSMinYEdge,
NSMaxXEdge,
NSMaxYEdge
};
-----
Problem is that typedef relies on _NSRectEdge, which is defined afterwards.
2.2) Compiler misses values for the definitions of
NSZeroPoint, NSZeroRect, NSZeroSize
in NSGeometry.h
With values like
-----
static const NSPoint NSZeroPoint __attribute__((unused)) = {0.0,0.0}; /* Zero
point. */
/** Zero-size rectangle at 0,0 */
static const NSRect NSZeroRect __attribute__((unused)) = {{0.0,0.0},{0.0,0.0}};
/* Zero rectangle. */
/** Zero size */
static const NSSize NSZeroSize __attribute__((unused)) = {0.0}; /* Zero size.
*/
-----
it works fine so far (at least my code ;)
2.3) NSPortMessage.h, line 103
A category name "private" is being used which should be renamed since
the compiler expects an additional identifier in this context
which seems to be related to the c++ syntax.
I implemented simple workarounds for me and the objc++ code compiles
and runs fine with them. My question is now wether someone
has adressed the issues mentioned above so far or is willing to adress
them? Or did anyone even successfully used GS Foundation in conjunction
with objc++?
Very much looking forward for your answers!
Thanks in advance and
best regards,
Oliver
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- GNUstep Base and Objective-C++,
Oliver Langer <=