On 2/9/09 10:42 AM, Peter N Lewis said:
>Personally, I just switch the whole project to compile everything in
>Objective C++ and this eliminates the need for ifdef __cplusplus at
>essentially no cost in compile time, execution speed or executable
>size. It just means you are only dealing with one
On Sun, Feb 8, 2009 at 8:42 PM, Peter N Lewis wrote:
> At 12:29 -0800 7/2/09, Steve Wart wrote:
>
>> It works fine in 10.5.6 with XCode 3.1 if I change the file type of
>> BasicOpenGLView.m to sourcecode.cpp.objcpp.
>
> You normally use the extension .mm for Objective C++ code.
>
> At 10:41 +0900
Thanks Peter.
I realized after posting my question that it wasn't actually Cocoa-related,
nor even Objective-C related - the error was a result of my inexperience
with C++.
Apologies to everyone for posting off-topic. I appreciate that this is a
high-volume list and didn't intend to distract from
At 12:29 -0800 7/2/09, Steve Wart wrote:
It works fine in 10.5.6 with XCode 3.1 if I change the file type of
BasicOpenGLView.m to sourcecode.cpp.objcpp.
You normally use the extension .mm for Objective C++ code.
At 10:41 +0900 9/2/09, Peter N Lewis wrote:
At 13:12 -0800 7/2/09, Steve Wart wr
Solved, thanks to the archives.
#ifdef __cplusplus
extern "C" {
#endif
extern CFunctionHere
#ifdef __cplusplus
}
#endif
Cheers,
Steve
On Sat, Feb 7, 2009 at 12:29 PM, Steve Wart wrote:
> I am trying to build an application that uses some C++ classes, based on
> Apple's example Cocoa OpenGL a
I am trying to build an application that uses some C++ classes, based on
Apple's example Cocoa OpenGL application here:
http://developer.apple.com/samplecode/CocoaGL/index.html#//apple_ref/doc/uid/DTS10004501
It works fine in 10.5.6 with XCode 3.1 if I change the file type of
BasicOpenGLView.m to