OS X Xcode 3.2
OS X Xcode 3.2
Since the new xcode (3.2) no longer supports carbon applications apparently, is there anyway for me to be able to build an application with irrlicht using cocoa? Or what now is the preferred way of creating an application under os x, the information currently on the forum seems outdated for older versions of xcode.
There's only one carbon function used by the OSX device, it should be simple enough to replace it for any seasoned OSX programmer (just remove the carbon framework, try to compile, find the errors, replace the function for the cocoa equivalent or remove the functionality), but I'm not one and didn't figure out what the replacement function is.
If you do work it out, please attach the changes to the carbon bug on our bug tracker
If you do work it out, please attach the changes to the carbon bug on our bug tracker
-
- Posts: 914
- Joined: Fri Aug 03, 2007 12:43 pm
- Location: South Africa
- Contact:
Fair enough. The problem is I am not a seasoned os x developer. I just happen to only have a mac laptop to develop my project on when I'm not at home. That being said I create a new cocoa application (which I thought was obj c only), and add the irrlicht framework, pump in the example 1 code, and receive 1145 various errors (that seem objective c related).
I guess I'm just looking for a tutorial/sample on how I should be creating my project as a cocoa application in xcode 3.2
I guess I'm just looking for a tutorial/sample on how I should be creating my project as a cocoa application in xcode 3.2
-
- Posts: 914
- Joined: Fri Aug 03, 2007 12:43 pm
- Location: South Africa
- Contact:
Sure thing, and thanks for the help
Like I said I am not familiar with OS X development. That being said in the newest xcode (3.2), I create a new cocoa application. I then add a new file, main.cpp, insert the tutorial 1 code, and add the irrlicht framework to my build target. Note - this is where I am confused because from what I have read cocoa is an objective c platform (but seems to be needed to build a proper irrlicht app? ). After that I get 1120 build errors in appkit.h (which I'm not even including anywhere).
My problem is probably trivial, I just have never build a cocoa application before.
Like I said I am not familiar with OS X development. That being said in the newest xcode (3.2), I create a new cocoa application. I then add a new file, main.cpp, insert the tutorial 1 code, and add the irrlicht framework to my build target. Note - this is where I am confused because from what I have read cocoa is an objective c platform (but seems to be needed to build a proper irrlicht app? ). After that I get 1120 build errors in appkit.h (which I'm not even including anywhere).
My problem is probably trivial, I just have never build a cocoa application before.
-
- Posts: 914
- Joined: Fri Aug 03, 2007 12:43 pm
- Location: South Africa
- Contact:
ah yes i see now, the error is a simple one.
On the "Targets" in the folder, select the target you are building and press CMD+I, or right click and say get info.
Under the build tab, type "precompiled header"
There should be a bunch or so of items, look for the one that has a _pch (its a file, this file is where the build errors points to as well).
Basically the default cocoa applications have that precompiled file in there, but not set up. Take the _pch file reference out (or just delete the few lines inside that header) and it should work.
OSX / Cocoa is an objective C platform, the difference being that .m files are objective C, and .mm files are objective C++. This allows you to write 1 line ObjC, 1 line ObjC++ and it will work just fine!
This allows writing a simple application layer on top of cocoa, and integrating a full fledged c++ engines, with no problem (seeing as it supports C++ as well).
On the "Targets" in the folder, select the target you are building and press CMD+I, or right click and say get info.
Under the build tab, type "precompiled header"
There should be a bunch or so of items, look for the one that has a _pch (its a file, this file is where the build errors points to as well).
Basically the default cocoa applications have that precompiled file in there, but not set up. Take the _pch file reference out (or just delete the few lines inside that header) and it should work.
OSX / Cocoa is an objective C platform, the difference being that .m files are objective C, and .mm files are objective C++. This allows you to write 1 line ObjC, 1 line ObjC++ and it will work just fine!
This allows writing a simple application layer on top of cocoa, and integrating a full fledged c++ engines, with no problem (seeing as it supports C++ as well).
Ahh brilliant!
It is working like a charm now, and building it as a cocoa app versus a console app also fixed all my keyboard focus problems
The last problem I'm having is that on top of the irrlicht window popping up, the cocoa window that evidently was initially part of the project is also popping up. Now I have everything removed from the project that I can see. Is there anyway I can delete this window from my project as well?
Again thanks so much for the help I'll finally be able to work on my projects when away from home now.
It is working like a charm now, and building it as a cocoa app versus a console app also fixed all my keyboard focus problems
The last problem I'm having is that on top of the irrlicht window popping up, the cocoa window that evidently was initially part of the project is also popping up. Now I have everything removed from the project that I can see. Is there anyway I can delete this window from my project as well?
Again thanks so much for the help I'll finally be able to work on my projects when away from home now.
Hi all,
I don't know if this is the correct place to post my problem but the topic title is about my prob.
I've succefully built irrlicht 1.6 on Mac Snow Leopard whith XCode(well) and all the examples run correctly under the irrlicht project.
But when I try to build one of the irrlicht example into a new project, Xcode compile succefully the example but it doesn't run and I have this error into Xcode console:
Can you help me to find out the problem?
many thanks.
I don't know if this is the correct place to post my problem but the topic title is about my prob.
I've succefully built irrlicht 1.6 on Mac Snow Leopard whith XCode(well) and all the examples run correctly under the irrlicht project.
But when I try to build one of the irrlicht example into a new project, Xcode compile succefully the example but it doesn't run and I have this error into Xcode console:
Code: Select all
[Session started at 2009-10-04 23:19:18 +0200.]
GNU gdb 6.3.50-20050815 (Apple version gdb-1344) (Fri Jul 3 01:19:56 UTC 2009)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin".tty /dev/ttys002
Loading program into debugger…
run
Running…
No executable file specified.
Use the "file" or "exec-file" command.
No executable file specified.
Use the "file" or "exec-file" command.
The program being debugged is not being run.
The program being debugged is not being run.
Can you help me to find out the problem?
many thanks.
Hi ecsos,
thanks for your reply but I don't understand why irrlicht source and the examples compiled (and work) fine into xcode while if i try to complie a single example into a new project, it compile well but it doesn't run.
I've set i386 architecture into project setting and also into target properties and i've also included the frameworks required ( cocoa, carbon, opengl and iokit ) and also the libirrlicht.a .
At this point i don't know what can i do more.
thanks for your reply but I don't understand why irrlicht source and the examples compiled (and work) fine into xcode while if i try to complie a single example into a new project, it compile well but it doesn't run.
I've set i386 architecture into project setting and also into target properties and i've also included the frameworks required ( cocoa, carbon, opengl and iokit ) and also the libirrlicht.a .
At this point i don't know what can i do more.
-
- Posts: 3
- Joined: Wed Jan 27, 2010 6:35 pm
Sorry, I've tried finding this under the target information, but nowhere can I find anything like _pch. Could someone point me in the right direction with this. I'm desperate to get it working on XCode!ah yes i see now, the error is a simple one.
On the "Targets" in the folder, select the target you are building and press CMD+I, or right click and say get info.
Under the build tab, type "precompiled header"
There should be a bunch or so of items, look for the one that has a _pch (its a file, this file is where the build errors points to as well).
Basically the default cocoa applications have that precompiled file in there, but not set up. Take the _pch file reference out (or just delete the few lines inside that header) and it should work.
OSX / Cocoa is an objective C platform, the difference being that .m files are objective C, and .mm files are objective C++. This allows you to write 1 line ObjC, 1 line ObjC++ and it will work just fine!
This allows writing a simple application layer on top of cocoa, and integrating a full fledged c++ engines, with no problem (seeing as it supports C++ as well).
Thanks
found it!!
In the target information, find the prefix header and delete the value it has (should be something about appkit). also uncheck precompile prefix header.
Now you should be able to use cpp files
Heres an example:
http://karlkirch.com/blog/2010/03/10/bu ... xcode-3-2/
Now you should be able to use cpp files
Heres an example:
http://karlkirch.com/blog/2010/03/10/bu ... xcode-3-2/
Your problem is simple... click 'Build and Run', than once is says running, click the "GDB" button in the bottom half of the screen to open the debugger output- it's awaiting your input!!!mordaneous wrote:anyone got any ideas?
[Session started at 2010-10-07 17:57:21 -0400.]
Please select the driver you want:
(a) OpenGL 1.x/2.x/3.x
(b) Direct3D 9.0c
(c) Direct3D 8.1
(d) Burning's Video
(e) Software Renderer
(f) NullDriver
Hopefully this finds you!