tags:

views:

1131

answers:

5

HI all

I am using some files on .mm extension in the xcode project for compiling these files we have added the LLVM-GCC 4.2 in the build setting after adding this compiler this showing the error

/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory

/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.sdk/usr/include/float.h:8:24: error: float.h: No such file or directory

i have no idea how to remove this error any help to remove this error.

thanks

Balraj

+1  A: 

These headers aren't supported in gcc 4.2 which is used by default on Mac OSX.

Switch to version 4.0 (it is described here)

elder_george
actually i am using xcode sdk 3.1 to use that code and also setting the whole project build by LLMV GCC 4.2 and after i adding it shows only two these directory file error else i do it with the gcc 4.0 as it stated in your link it throws the many errors so is there any way to add these files in that compiler directory please guide me !!!
balraj
* Are you sure that those were errors and not warnings? If latter, you can probably ignore them.* If they are errors, consider commenting out #include's you have problems with. It is possible that they won't be really needed for your project. * Otherwise, you can look at this post http://www.mailinglistarchive.com/[email protected]/msg17102.htmlAuthor says that reason is in missing headers in /usr/lib/gcc/4.2/include (or somewhere near it). You may try to copy missing files from prior version of gcc (4.0, e.g.).Unfortunately, I can't check whether any of these works =(
elder_george
yea i am dead sure that these are errors not warnings
balraj
pls check these are the error/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.sdk/usr/include/float.h:8:24: error: float.h: No such file or directorythese are the errors that are coming on !!!
balraj
as far as I remember, there're 'include_next' clauses in files stdarg.h and float.h in /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.sdk/usr/include/this means that preprocessor tries to find additional includes with the same name in other folder and when it can't it shows you errors you've decribed. Pretty messy if you ask me.This is decribed here http://www.mailinglistarchive.com/[email protected]/msg17102.html.
elder_george
A: 

I ran into this problem as well, and changing to GCC 4.0 didn't fix it for me. I also had to change my active SDK (drop-down in the upper-left corner of the Xcode editor or console window) from 10.4 (Base SDK) to 10.6 (I'm running Snow Leopard).

I don't know what implications this might have on your development, but it was good enough for my problem because I'm just doing a basic command-line tool for easy stuff.

ClarkW
A: 

I ran into this error building my Hello World app in xcode after doing an install of the SDL framework. Doing the standard install, by the book, into Snow Leopard OSX 10.6.3 with xcode 3.3.2 threw those errors,

"stdarg.h: No such file or directory" "float.h: No such file or directory"

because it defaults to SDK 10.4.

If you have that issue set the SDK to 10.6 and you should be in the clear.

Genkilabs
A: 

I ran into the same problem, and couldn't fix the problem with all other answers here, so I tried:

cd /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk/usr/include
sudo mv stdarg.h stdarg.h.original
sudo ln -s /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk/usr/lib/gcc/arm-apple-darwin9/4.0.1/include/stdarg.h

and the compile error is gone!

mash
A: 
Kenneth Lewis