Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build for iOS #21

Open
RealyUniqueName opened this issue Jan 19, 2018 · 3 comments
Open

Unable to build for iOS #21

RealyUniqueName opened this issue Jan 19, 2018 · 3 comments

Comments

@RealyUniqueName
Copy link

RealyUniqueName commented Jan 19, 2018

I am trying to build this extension:

$ cd project
$ haxelib run hxcpp Build.xml -Diphone

Compiling group: iphone
g++ -Iinclude -Iios/include -c -fvisibility=hidden -stdlib=libstdc++ -Qunused-arguments -O2 -I/Users/alex-mac/haxelib/hxcpp/3,4,188/include -DHX_MACOS -m64 -Wno-parentheses -Wno-unused-value -Wno-format-extra-args -Wno-overflow -DHXCPP_M64 -DHXCPP_VISIT_ALLOCS(haxe) -DHXCPP_API_LEVEL=0(haxe) ... tags=[haxe,static]
 - ios/Share.mm 
Error: ./ios/Share.mm:2:9: fatal error: 'UIKit/UIKit.h' file not found
#import <UIKit/UIKit.h>
        ^~~~~~~~~~~~~~~
1 error generated.

And if i run lime rebuild from extension root directory:

$ lime rebuild . ios -debug

Compiling group: common
xcrun --sdk iphoneosnull clang++ -Iinclude -c -stdlib=libc++ -g -arch armv7 -isysroot /Library/Developer/CommandLineTools/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOSnull.sdk -miphoneos-version-min=5.0 -DENABLE_BITCODE=YES -fembed-bitcode-marker -Wno-parentheses -Wno-null-dereference -Wno-unused-value -Wno-overflow -Wno-bool-conversion -fno-stack-protector -DIPHONE=IPHONE -DIPHONEOS=IPHONEOS -DHXCPP_DEBUG -DSTATIC_LINK(static) -DHXCPP_VISIT_ALLOCS(haxe) -DHXCPP_API_LEVEL=0(haxe) -I/Users/alex-mac/haxelib/hxcpp/3,4,188/include -fexceptions -fstrict-aliasing ... tags=[haxe,static]
 - common/ExternalInterface.cpp 
Error: xcrun: error: SDK "iphoneosnull" cannot be located
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOSnull.sdk' [-Wmissing-sysroot]
In file included from ./common/ExternalInterface.cpp:11:
In file included from /Users/alex-mac/haxelib/hxcpp/3,4,188/include/hx/CFFI.h:15:
In file included from /Users/alex-mac/haxelib/hxcpp/3,4,188/include/hx/OS.h:85:
/Library/Developer/CommandLineTools/usr/include/c++/v1/errno.h:32:15: fatal error: 'errno.h' file not found
#include_next <errno.h>
              ^~~~~~~~~
1 error generated.
@penwyp
Copy link

penwyp commented Sep 28, 2018

I am trying to build this extension:

$ cd project
$ haxelib run hxcpp Build.xml -Diphone

Compiling group: iphone
g++ -Iinclude -Iios/include -c -fvisibility=hidden -stdlib=libstdc++ -Qunused-arguments -O2 -I/Users/alex-mac/haxelib/hxcpp/3,4,188/include -DHX_MACOS -m64 -Wno-parentheses -Wno-unused-value -Wno-format-extra-args -Wno-overflow -DHXCPP_M64 -DHXCPP_VISIT_ALLOCS(haxe) -DHXCPP_API_LEVEL=0(haxe) ... tags=[haxe,static]
 - ios/Share.mm 
Error: ./ios/Share.mm:2:9: fatal error: 'UIKit/UIKit.h' file not found
#import <UIKit/UIKit.h>
        ^~~~~~~~~~~~~~~
1 error generated.

And if i run lime rebuild from extension root directory:

$ lime rebuild . ios -debug

Compiling group: common
xcrun --sdk iphoneosnull clang++ -Iinclude -c -stdlib=libc++ -g -arch armv7 -isysroot /Library/Developer/CommandLineTools/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOSnull.sdk -miphoneos-version-min=5.0 -DENABLE_BITCODE=YES -fembed-bitcode-marker -Wno-parentheses -Wno-null-dereference -Wno-unused-value -Wno-overflow -Wno-bool-conversion -fno-stack-protector -DIPHONE=IPHONE -DIPHONEOS=IPHONEOS -DHXCPP_DEBUG -DSTATIC_LINK(static) -DHXCPP_VISIT_ALLOCS(haxe) -DHXCPP_API_LEVEL=0(haxe) -I/Users/alex-mac/haxelib/hxcpp/3,4,188/include -fexceptions -fstrict-aliasing ... tags=[haxe,static]
 - common/ExternalInterface.cpp 
Error: xcrun: error: SDK "iphoneosnull" cannot be located
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOSnull.sdk' [-Wmissing-sysroot]
In file included from ./common/ExternalInterface.cpp:11:
In file included from /Users/alex-mac/haxelib/hxcpp/3,4,188/include/hx/CFFI.h:15:
In file included from /Users/alex-mac/haxelib/hxcpp/3,4,188/include/hx/OS.h:85:
/Library/Developer/CommandLineTools/usr/include/c++/v1/errno.h:32:15: fatal error: 'errno.h' file not found
#include_next <errno.h>
              ^~~~~~~~~
1 error generated.

Have you solve this problem?

@RealyUniqueName
Copy link
Author

RealyUniqueName commented Sep 28, 2018

Oh. Sorry, completely forgot about this issues, when I finally resolved it for me.
Unfortunately now I don't even remember how did I fix it.
What I remember is that I googled for "'UIKit/UIKit.h' file not found" and applied updates to XCode and did some tweaks in it. Though, not sure if the latter two points were related to this issue.

@RealyUniqueName
Copy link
Author

Also in my project I ended up using the haxelib version of this lib.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants