NO such file or directory for files ----- stdarg.h and float.h?

I use some files on the .mm extension in the xcode project to compile these files, we added LLVM-GCC 4.2 in the build setup after adding this compiler that shows an 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 do not know how to remove this error to help resolve this error.

thanks

Balraj

+3
source share
7 answers

These headers are not supported in gcc 4.2, which is the default for Mac OSX.

Upgrade to version 4.0 (described here )

+1
source

I ran into the same problem and couldn't solve the problem with all the 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

!

+1

GCC 4.0. LLVM 1.6. Mac OS X 10.7.3 Xcode 3.2.5

+1

, GCC 4.0 . SDK ( Xcode ) 10.4 ( SDK) 10.6 ( Snow Leopard).

, , , .

0

, Hello World xcode SDL-. , , Snow Leopard OSX 10.6.3 xcode 3.3.2 ,

"stdarg.h: " "float.h: "

SDK 10.4.

, SDK 10.6, .

0

, , Base SDK; SDK GCC 4.0, SDK GCC 4.0 4.2 ( LLVM).

, :

Basic SDK for iOS projects / goals:
iOS 3.2 and earlier: GCC 4.0
iOS 4.0 and later: GCC 4.0, GCC 4.2, LLVM GCC 4.2, LLVM Clang

Basic SDK for Mac OS X projects / goals:
Mac OS X 10.5 and earlier: GCC 4.0
Mac OS X 10.6 and later: GCC 4.0, GCC 4.2, LLVM GCC 4.2, LLVM Clang

0
source

add additional flags as shown below

CFLAGS += -I"$(YOUR_SYSROOT)/usr/lib/gcc/arm-apple-darwin10/4.2.1/include"
CPPFLAGS += -I"$(YOUR_SYSROOT)/usr/include/c++/4.2.1"
CPPFLAGS += -I"$(YOUR_SYSROOT)/usr/include/c++/4.2.1/armv6-apple-darwin10" 
0
source

Source: https://habr.com/ru/post/1719811/


All Articles