newbie questions: mixing languages
newbie questions: mixing languages
- Subject: newbie questions: mixing languages
- From: Markian Hlynka <email@hidden>
- Date: Tue, 6 Apr 2004 14:56:55 -0600
Hi all!
I've recently started going through some cocoa obj-c tutorials, and I'm
enjoying myself.
However, while I appreciate obj-c for the interface, I have no great
desire to rewrite code that is debugged and optimized in C++ or C.
For example, let's say I have a highly optimized alpha-beta search
written in C++. Now, I'd love to write the interface in Obj-C and
Cocoa, and just "drop in" the C++ classes I need for the search engine.
Will this work? Where can I find information on integrating C++ and
obj-C like this? I do understand that I have to interface with Cocoa in
either Obj-C or Java. But, how do I send data from Obj-C to C++, and
vice versa? For example, the human makes a move on a chessboard, which
I use Obj-C to get from the interface and transform into board
coordinates. Now, can I just pass these to my C++ class? Where do I
instantiate my C++ class?
Anyway, I'm sure you all get the idea.
On a related note, would it be easier to do this with Java using JNI
stuff to launch a local server and connect to it?
Thanks,
Markian
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.