HaxeExtension / extension-share

Share Extension for OpenFL
Other
43 stars 12 forks source link

Unable to build for iOS #21

Open RealyUniqueName opened 6 years ago

RealyUniqueName commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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