yetist / ios-toolchain-based-on-clang-for-linux

Automatically exported from code.google.com/p/ios-toolchain-based-on-clang-for-linux
0 stars 0 forks source link

Unable to build "HelloWorld" test project #19

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install toolchain as described in [HowTo_en] wiki page (prebuilt packages 
for Ubuntu 13.04)
2. Create HelloWorld project from "Build an iOS App" this wiki page section.
3. try to make it

What is the expected output? What do you see instead?

I see:
make
ios-clang -c -I/usr/include/llvm-c-3.2 -objc-arc -fblocks -g0 -O2 -I"." 
HelloWorldApplication.m -o HelloWorldApplication.o
In file included from HelloWorldApplication.m:1:
In file included from ./HelloWorldApplication.h:1:
In file included from /usr/share/iPhoneOS5.0.sdk/usr/include/UIKit/UIKit.h:9:
In file included from 
/usr/share/iPhoneOS5.0.sdk/usr/include/UIKit/UIAccelerometer.h:8:
In file included from 
/usr/share/iPhoneOS5.0.sdk/usr/include/Foundation/Foundation.h:6:
/usr/share/iPhoneOS5.0.sdk/usr/include/CoreFoundation/CoreFoundation.h:12:10: 
fatal error: 'stdarg.h' file not found
#include <stdarg.h>
         ^
1 error generated.
make: *** [HelloWorldApplication.o] Error 1

What version of the product are you using? On what operating system?

Ubuntu 13.04 with prebuild packages provided in download section.

Please provide any additional information below.

stdarg.h present in iPhoneOS5.0.sdk/usr/include/c++/4.2.1/tr1 folder, but it 
also includes other stdarg.h from somewhere?
Same error using 6.0 SDK.

Original issue reported on code.google.com by djd...@gmail.com on 26 Sep 2013 at 3:18

GoogleCodeExporter commented 9 years ago
Hi! solved this problem by exporting flags:

export CXXFLAGS=-I/usr/include/clang/3.2/include
export CFLAGS=-I/usr/include/clang/3.2/include

Original comment by djd...@gmail.com on 27 Sep 2013 at 11:14

GoogleCodeExporter commented 9 years ago
Don't do this, it's dangerous and may break Makefiles, configure scripts and so 
on.
Better use the C_INCLUDE_PATH and CPLUS_INCLUDE_PATH environment variables.

export C_INCLUDE_PATH="path_to_float.h:$C_INCLUDE_PATH"
export CPLUS_INCLUDE_PATH="path_to_float.h:$CPLUS_INCLUDE_PATH"

Put this into your ~/.profile .

Original comment by t.poecht...@gmail.com on 5 Nov 2013 at 8:12