SOLVED: Problem Setting up an Ogre Project in XCode 3.0

Problems building or running the engine, queries about how to use features etc.
Post Reply
mgants4
Gnoblar
Posts: 6
Joined: Fri Mar 21, 2008 11:28 pm
Location: Hamburg Germany

SOLVED: Problem Setting up an Ogre Project in XCode 3.0

Post by mgants4 »

Hello Ogre People,

I am trying to set up an Ogre application (1.4.7) in XCode (3.0) on Mac OS X (10.5.2) and am running into problems. I hope someone with more experience w/ Ogre on the Mac can help me with this.

I can build Ogre from source and run the samples just fine on the mac. However creating my own project just is not working for me.

I believe I have all of the required Ogre frameworks and libs included (per instructions) and have drag & dropped all of Ogre's framework, library, and header file search paths into the project/target settings.

Just a note, I have not "installed" the ogre frameworks into my system after building them - I just refer directly to the ogre framework's build location from my project.

I have tried the following with no success:

1) Following the instructions for "setting up an app" on the wiki.

2) Making a copy of the Ogre Samples project and stripping it down and adding my own code.

In each case, as soon as I include Ogre.h (or <Ogre/Ogre.h>) I start getting the following compiler errors:

Code: Select all

/Developer/SDKs/MacOSX10.5.sdk/usr/include/libkern/i386/OSByteOrder.h:42: error: 'uint16_t' does not name a type
/Developer/SDKs/MacOSX10.5.sdk/usr/include/libkern/i386/OSByteOrder.h:55: error: 'uint32_t' does not name a type
/Developer/SDKs/MacOSX10.5.sdk/usr/include/libkern/i386/OSByteOrder.h:68: error: 'uint64_t' does not name a type
/Developer/SDKs/MacOSX10.5.sdk/usr/include/libkern/i386/OSByteOrder.h:87: error: 'uint16_t' has not been declared
/Developer/SDKs/MacOSX10.5.sdk/usr/include/libkern/i386/OSByteOrder.h:90: error: expected primary-expression before 'volatile'
/Developer/SDKs/MacOSX10.5.sdk/usr/include/libkern/i386/OSByteOrder.h:90: error: expected `)' before 'volatile'
  
I found a similar thread describing the same problem I am having, but it seems to have trailed off without offering a solution.

I'm sure it is probably something simple that I am (or am not) doing, but I just can't seem to get it. I sure would appreciate it if someone could offer a few suggestions.

Thanks
Last edited by mgants4 on Thu Apr 03, 2008 8:17 pm, edited 2 times in total.
Auria
Greenskin
Posts: 112
Joined: Sun Jan 21, 2007 8:42 pm

Post by Auria »

You could just try to find what file defines 'uint16_t' and include it first - (then possibly submit a patch so that Ogre.h contains it) - otherwise you might want to go to an apple mailing list as no one here seems to know what is this error (i myself am on OS X 10.4 so don't meet this). if samples work fine then the direct way is to figure out what the difference is between your project and the sample's project
Musi00e0
Gnoblar
Posts: 2
Joined: Tue Apr 01, 2008 8:23 pm
Location: Plano, TX
Contact:

Post by Musi00e0 »

I was having this exact same problem and think I have a solution for it. Just finishing testing it out.. Maybe once I post my workaround, someone else can figure what the actual underlying problem was.. =)

Hope that was nice and elusive. More to come...
Musi00e0
Gnoblar
Posts: 2
Joined: Tue Apr 01, 2008 8:23 pm
Location: Plano, TX
Contact:

Post by Musi00e0 »

The thing that was causing me this problem has to do with how the Header search path was set to include the header files in the Dependencies folder.

I originally had it set to Dependencies/include like normal, but I had the "Recursive" checkbox checked.

When I unchecked this, all those errors went away.
Does this work for you?
mgants4
Gnoblar
Posts: 6
Joined: Fri Mar 21, 2008 11:28 pm
Location: Hamburg Germany

Post by mgants4 »

Yes, yes it does!

...so simple, but so frustrating...

Thank you very much Musi00e0 :D
Auria
Greenskin
Posts: 112
Joined: Sun Jan 21, 2007 8:42 pm

Post by Auria »

Hey great, maybe someone with a 10.5 system could update the wiki? i've seen quite a few people have that problem
mgants4
Gnoblar
Posts: 6
Joined: Fri Mar 21, 2008 11:28 pm
Location: Hamburg Germany

Post by mgants4 »

Good idea. I just added a short note to the wiki page for application setup using XCode.
guido
Gnoblar
Posts: 22
Joined: Fri Jan 18, 2008 10:44 pm

Post by guido »

You guys are so so smart ^^Y
guido
Gnoblar
Posts: 22
Joined: Fri Jan 18, 2008 10:44 pm

Post by guido »

By the by, are you also having the exact same problems now in the following form;
cd /Users/guidocalvano/Tree/Data/Zin/Code/Zin
/Developer/usr/bin/gcc-4.0 -x c++ -arch ppc64 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -Os -mdynamic-no-pic -Wreturn-type -Wunused-variable -fmessage-length=0 -mtune=G4 -fvisibility=hidden -fvisibility-inlines-hidden -mmacosx-version-min=10.5 -gdwarf-2 -I/Users/guidocalvano/Tree/Data/Zin/Code/Zin/build/Zin.build/Release/Zin.build/Zin.hmap -F/Users/guidocalvano/Tree/Data/Zin/Code/Zin/build/Release -F/Users/guidocalvano/Tree/Data/Zin/Code/Zin/OgreSDK/Dependencies -F/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks -I/Users/guidocalvano/Tree/Data/Zin/Code/Zin/build/Release/include -I/Users/guidocalvano/Tree/Data/Zin/Code/Zin/OgreSDK/Dependencies/Ogre.framework/Headers -I/Users/guidocalvano/Tree/Data/Zin/Code/Zin/OgreDependencies_OSX_Eihort_20080115/Dependencies/include -I/Users/guidocalvano/Tree/Data/Zin/Code/Zin/build/Zin.build/Release/Zin.build/DerivedSources -isysroot /Developer/SDKs/MacOSX10.5.sdk -include /Users/guidocalvano/Tree/Data/Zin/Code/Zin/Zin_Prefix.pch -c /Users/guidocalvano/Tree/Data/Zin/Code/Zin/main.cp -o /Users/guidocalvano/Tree/Data/Zin/Code/Zin/build/Zin.build/Release/Zin.build/Objects-normal/ppc64/main.o
/Users/guidocalvano/Tree/Data/Zin/Code/Zin/HIFramework/TWindow.h: In member function 'void TWindow::Activate() const':
/Users/guidocalvano/Tree/Data/Zin/Code/Zin/HIFramework/TWindow.h:86: error: '::ActivateWindow' has not been declared
[ deleted a bunch of lines not to flood the forum]

/Users/guidocalvano/Tree/Data/Zin/Code/Zin/main.cp: In static member function 'static void MainWindow::Create()':
/Users/guidocalvano/Tree/Data/Zin/Code/Zin/main.cp:75: error: 'RepositionWindow' was not declared in this scope
/Users/guidocalvano/Tree/Data/Zin/Code/Zin/HIFramework/TWindow.h:86: error: '::ActivateWindow' has not been declared
/Users/guidocalvano/Tree/Data/Zin/Code/Zin/HIFramework/TWindow.h:88: error: '::ActivateWindow' has not been declared
/Users/guidocalvano/Tree/Data/Zin/Code/Zin/HIFramework/TWindow.h:90: error: '::BringToFront' has not been declared
/Users/guidocalvano/Tree/Data/Zin/Code/Zin/main.cp:75: error: 'RepositionWindow' was not declared in this scope
cd /Users/guidocalvano/Tree/Data/Zin/Code/Zin
/Developer/usr/bin/gcc-4.0 -x c++ -arch ppc64 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -Os -mdynamic-no-pic -Wreturn-type -Wunused-variable -fmessage-length=0 -mtune=G4 -fvisibility=hidden -fvisibility-inlines-hidden -mmacosx-version-min=10.5 -gdwarf-2 -I/Users/guidocalvano/Tree/Data/Zin/Code/Zin/build/Zin.build/Release/Zin.build/Zin.hmap -F/Users/guidocalvano/Tree/Data/Zin/Code/Zin/build/Release -F/Users/guidocalvano/Tree/Data/Zin/Code/Zin/OgreSDK/Dependencies -F/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks -I/Users/guidocalvano/Tree/Data/Zin/Code/Zin/build/Release/include -I/Users/guidocalvano/Tree/Data/Zin/Code/Zin/OgreSDK/Dependencies/Ogre.framework/Headers -I/Users/guidocalvano/Tree/Data/Zin/Code/Zin/OgreDependencies_OSX_Eihort_20080115/Dependencies/include -I/Users/guidocalvano/Tree/Data/Zin/Code/Zin/build/Zin.build/Release/Zin.build/DerivedSources -isysroot /Developer/SDKs/MacOSX10.5.sdk -include /Users/guidocalvano/Tree/Data/Zin/Code/Zin/Zin_Prefix.pch -c /Users/guidocalvano/Tree/Data/Zin/Code/Zin/HIFramework/TWindow.cp -o

[ lots and lost more (I think 39 build errors in total) ]

/Users/guidocalvano/Tree/Data/Zin/Code/Zin/HIFramework/TWindow.cp:746: error: 'ShowControl' was not declared in this scope
/Users/guidocalvano/Tree/Data/Zin/Code/Zin/HIFramework/TWindow.cp:783: error: 'HideControl' was not declared in this scope
/Users/guidocalvano/Tree/Data/Zin/Code/Zin/HIFramework/TWindow.cp:815: error: 'GetWindowProperty' was not declared in this scope
mgants4
Gnoblar
Posts: 6
Joined: Fri Mar 21, 2008 11:28 pm
Location: Hamburg Germany

Post by mgants4 »

Sorry, I never got those specific errors. It looks like you are just missing a framework and some includes (?)

Try following these instructions for setting up an app and you should be ok.
shenakan
Kobold
Posts: 29
Joined: Tue May 15, 2007 4:20 pm

Post by shenakan »

mgants4 wrote:Sorry, I never got those specific errors. It looks like you are just missing a framework and some includes (?)

Try following these instructions for setting up an app and you should be ok.

Here there is a page with the installation and some screenshot.
http://www.macogre.googlepages.com/
Post Reply