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

garthbender

macrumors newbie
Original poster
Sep 3, 2009
3
0
I wanted to see if anyone has run into this problem or has any ideas on how to fix it.

In brief, after I upgraded to Snow Leopard, every time I try to compile an application using sqlite3 I get the following error message:

error: /usr/include/sqlite3.h: No such file or directory

I've checked and the header file is in the correct location with regards to my XCode install:

/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.sdk/usr/include/sqlite3.h

If I put that full path in XCode can find the file when it compiles. It's almost like it lost the base path or something.

Anyhow, I unistalled and reinstalled XCode a few times and that didn't do the trick. Currently I'm using version 3.1.4, but I rolled back to previous versions and still nothing.

Ok, I don't think I forgot anything. If there are any ideas out there, they would be greatly appreciated.

~ Thanks in advance
~ Garth
 

PhoneyDeveloper

macrumors 68040
Sep 2, 2008
3,114
93
These two things are obviously different

/usr/include/sqlite3.h

/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.sdk/usr/include/sqlite3.h

You probably have a header search path that is the first path and which is wrong. Remove it.

Do you have #includes like this #include "/usr/include/sqlite3.h" ? Those are also wrong. Change them to #include "sqlite3.h"
 

garthbender

macrumors newbie
Original poster
Sep 3, 2009
3
0
Thanks for the help!

I had the imports as: #import "/usr/include/sqlite3.h" and changed them to: #include "sqlite3.h" as you suggested and it got rid of the problem. I also checked the header search path, and it was empty. Now, whenever I compile I get the following:

arm-apple-darwin9-gcc-4.2.1: libgomp.spec: No such file or directory

Were there so many changes with Snow Leopard that I should be having this many problems? Everything's been compiling fine for about a year and right after the upgrade these problems started popping up. It really looks like, for some reason, it's picking up the paths relative to the base OS instead of the SDK.

Thanks again for the suggestion. At least it got me past one frustrating thing!

~ Garth
 

PhoneyDeveloper

macrumors 68040
Sep 2, 2008
3,114
93
Your #include was wrong. Not apple's fault.

Re: libgomp.spec. This file seems to be part of gcc. I don't think it's included in any of my projects but might be included implicitly in them. You should look at the build transcript and see if it's in there, probably on the Ld line. If you find and can't figure it out post the part of the build transcript that includes it. If not, I have no idea.
 

garthbender

macrumors newbie
Original poster
Sep 3, 2009
3
0
AHA! You are a god!

I switched from gcc 4.2.1 to gcc 4.0 and it compiled fine... Which is weird because libgomp.spec is included in the former and not the latter. Anyhow, it works and that's what counts.

Thanks for the help!

~ Garth
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.