Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Blakeasd

macrumors 6502a
Original poster
Dec 29, 2009
643
0
I am getting a strange Xcode error, and I don't know why.
This is the error I'm getting:
ScreenShot2011-06-28at22942PM.png


The file it says I don't have is in my Xcode project as you can see from this screenshot:
ScreenShot2011-06-28at23027PM.png


Why is this happening?? I am looking at the .h file right now :confused:
 
@lloydean, I get the same error. This is pre-written code that came with the Cocos2dBox2d Mac template.
@mydogisbox What do you mean by folder structure?
 
The fact the your looking at b2Settings.h just provides that it exists.
Where does it actually sit in your filesystem?
 
/Users/blake/Desktop/Penguin Quest/Penguin Quest/b2Settings.h
(Penguin Quest is the name of my app)
 
I changed the #included statement to this
Code:
#include <b2Settings.h>
and I don't get an error anymore. Will this cause me problems along the way or did I fix the issue?
 
/Users/blake/Desktop/Penguin Quest/Penguin Quest/b2Settings.h
(Penguin Quest is the name of my app)

Then how do you expect Box2D/common/b2Settings.h to find that?! There's no Box2D folder, no common folder.

Assuming b2Settings.h doesn't include other files itself presuming it's in the common subfolder of the Box2D folder.
Code:
#include "b2Settings.h"
 
I changed the #included statement to this
Code:
#include <b2Settings.h>
and I don't get an error anymore. Will this cause me problems along the way or did I fix the issue?

It's wrong to use <> here. It's correct to use "". They are different.

#include <blah.h> is the correct way to access header files on the system header file search path, including header files in linked frameworks.

#include "blah.h" is the correct way to access header files local to your project.

Although you didn't code b2Settings.h, it is local to your project, so it's correct to use "".

XCode3 has the "Always search user paths" build setting set to true by default, so the mistake of using <> instead of "" isn't flagged as an error. That build setting is evil. XCode4 has the build setting set to false by default.
 
Wtf

I am having yet another darn Xcode error:
"Ignoring file /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks//OpenAL.framework, file was built for unsupported file format which is not the architecture being linked (x86_64)"

This is driving me CRAZY, I've spent at least an hour correcting the include lines and now this weird error!

Can you please help? Whoever wrote this template is trying to drive me crazy I think :confused:
 
#include statement with Box2d

I am having issues with Box2d. Here is the error:
ScreenShot2011-06-28at22942PM.png

As you can see the file exists and it IS in the right spot.
ScreenShot2011-07-02at31713PM.png



What's going on?! :confused: I think it has to do with the <> and maybe it should be "", but how can I just get the <>s to work because there are probably 1,000 of these includes.
Thanks
 
I am having issues with Box2d. Here is the error:
Image
As you can see the file exists and it IS in the right spot.
Image


What's going on?! :confused: I think it has to do with the <> and maybe it should be "", but how can I just get the <>s to work because there are probably 1,000 of these includes.
Thanks

Now that you have the full and property file hierarchy for Box2D, you indeed need to use <> instead "". Add the path to the Supporting Files directory to your project's or target's header search paths build setting.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.