Include AVFoundation Framework in Theos application - ios

I am writing an application for my iPhone 5 using Theos tools and I want to use AVFoundation framework.
I've included AVFoundation in FRAMEWORKS section of my Makefile:
include theos/makefiles/common.mk
APPLICATION_NAME = appName
appName_FILES = main.m appNameApplication.mm RootViewController.mm StandardPlaybackVC.mm
appName_FRAMEWORKS = UIKit CoreGraphics AVFoundation
include $(THEOS_MAKE_PATH)/application.mk
But it doesn't seem to work and give the following error:
error: unknown type name 'AVAudioPlayer'
I've also tried to include this line in my header file:
#import <AVFoundation/AVFoundation.h>
But this gives a lot of confusing errors:
In file included from RootViewController.mm:3:
In file included from ./StandardPlaybackVC.h:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h:12:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVBase.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:9:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/objc/NSObjCRuntime.h:9:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/objc/objc.h:31:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/sys/types.h:75:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/sys/cdefs.h:680:2: error:
Unsupported architecture
#error Unsupported architecture
^
In file included from RootViewController.mm:3:
In file included from ./StandardPlaybackVC.h:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h:12:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVBase.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:9:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/objc/NSObjCRuntime.h:9:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/objc/objc.h:31:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/sys/types.h:78:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/machine/types.h:37:2: error:
architecture not supported
#error architecture not supported
^
In file included from RootViewController.mm:3:
In file included from ./StandardPlaybackVC.h:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h:12:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVBase.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:9:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/objc/NSObjCRuntime.h:9:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/objc/objc.h:31:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/sys/types.h:79:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/sys/_types.h:33:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/machine/_types.h:34:2: error:
architecture not supported
#error architecture not supported
^
In file included from RootViewController.mm:3:
In file included from ./StandardPlaybackVC.h:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h:12:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVBase.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:9:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/objc/NSObjCRuntime.h:9:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/objc/objc.h:31:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/sys/types.h:81:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/machine/endian.h:37:2: error:
architecture not supported
#error architecture not supported
^
In file included from RootViewController.mm:3:
In file included from ./StandardPlaybackVC.h:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h:12:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVBase.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:12:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.0/include/limits.h:38:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/limits.h:64:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/machine/limits.h:8:2: error:
architecture not supported
#error architecture not supported
^
In file included from RootViewController.mm:3:
In file included from ./StandardPlaybackVC.h:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h:14:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioBuffer.h:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioTypes.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:21:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/signal.h:63:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/sys/signal.h:81:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/machine/signal.h:34:2: error:
architecture not supported
#error architecture not supported
^
In file included from RootViewController.mm:3:
In file included from ./StandardPlaybackVC.h:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h:14:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioBuffer.h:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioTypes.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:21:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/signal.h:63:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/sys/signal.h:145:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/machine/_mcontext.h:31:2: error:
architecture not supported
#error architecture not supported
^
In file included from RootViewController.mm:3:
In file included from ./StandardPlaybackVC.h:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h:14:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioBuffer.h:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioTypes.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:43:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFByteOrder.h:10:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/libkern/OSByteOrder.h:45:10: fatal error:
'libkern/machine/OSByteOrder.h' file not found
#include <libkern/machine/OSByteOrder.h>
^
8 errors generated.
I do not use #import pragmas for UIKit and Core Graphics so I thought that modifying the Makefile should be enough...
What am I doing wrong here? And what is the right way of including frameworks in Theos? I'm using iPhone SDK 8.1.
Thank you!

I had same error on my tweaks,but solved this error.
Cause is the StandardPlaybackVC file.
UIKit CoreGraphics AVFoundation,
Don't write all "#import Framework" in StandardPlaybackVC.

Related

Could not build Objective-C module 'CoreGraphics'

I'm getting the following error when trying to run any of my unit or UI tests. Doesn't happen when running the application itself. The error message is shown below:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBase.h:12:10: note: while building module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBase.h:12:
#include <CoreFoundation/CFBase.h>
^
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "Headers/CoreFoundation.h"
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:43:10: note: in file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:43:
#include <CoreFoundation/CFBase.h>
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:72:10: note: in file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:72:
#include <Block.h>
^
/Users/eirik/Documents/Utvikling/iOS/ProsjekterSamarbeid/AnchorPoint Fishing as/FerskFiskiOS/Pods/leveldb-library/table/Block.h:10:10: note: in file included from /Users/eirik/Documents/Utvikling/iOS/ProsjekterSamarbeid/AnchorPoint Fishing as/FerskFiskiOS/Pods/leveldb-library/table/Block.h:10:
#include "leveldb/iterator.h"
^
/Users/eirik/Documents/Utvikling/iOS/ProsjekterSamarbeid/AnchorPoint Fishing as/FerskFiskiOS/Pods/leveldb-library/include/leveldb/iterator.h:18:10: note: in file included from /Users/eirik/Documents/Utvikling/iOS/ProsjekterSamarbeid/AnchorPoint Fishing as/FerskFiskiOS/Pods/leveldb-library/include/leveldb/iterator.h:18:
#include "leveldb/slice.h"
/Users/eirik/Documents/Utvikling/iOS/ProsjekterSamarbeid/AnchorPoint Fishing as/FerskFiskiOS/Pods/leveldb-library/include/leveldb/slice.h:21:10: error: 'string' file not found
#include <string>
^
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "Headers/CoreGraphics.h"
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:8:10: note: in file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:8:
#include <CoreGraphics/CGBase.h>
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBase.h:12:10: error: could not build module 'CoreFoundation'
#include <CoreFoundation/CFBase.h>
^
<unknown>:0: error: could not build Objective-C module 'CoreGraphics'
I'm using Xcode 9 in Swift 3.2 mode and CocoaPods. I'm using Firebase and FirebaseUI, which has leveldb as a dependency. You can see that the error is first triggered in leveldb/slice.h, which cannot find the string file.
I have tried the following up to this point:
Clean (Shift + CMD + K)
Remove DerivedData
Clean Build Folder...
Allow Non-Modular Includes In Framework Modules in Build Settings.
pod deintegrate, pod clean pod install.
For what it's worth, here's the error in the Issue Navigator:
Any suggestions?
This looks similar to a CocoaPods issue that was fixed in CocoaPods 1.4.0. Search paths were not properly set for unit test targets.
Try updating to the CocoaPods 1.4.0 beta and rerun pod update
Or use a comparable workaround to the one described here for the leveldb path:
Add "${PODS_ROOT}/leveldb-library/include" to your Tests target only under Build Settings -> Header Search Paths

Unable to compile/link program after inclusion of opencv.hpp

I am trying to compile a program which uses opencv. I have included the opencv.hpp file in the .h and the .c file which needs the opencv functions. The project also has the properties set to use opencv. I am using 2.4.5 version of opencv. The problems I am facing is that after including these files in the project the project fails to compile. I get an error saying I have failed to #inlcude "stdafx.h". This is because I am using precompiled headers and #include"stdafx.h" has to be the first line of code in that .c or .cpp file. If I add the inclusion of stdafx.h tehn the program compiles but it does not link.
shown below is how i have included the files in the .c file.
**
include "../stdafx.h"
include "C:\opencv\include\opencv2\opencv.hpp"
include "DPD_AlgorithmInit.h"
**
and shown below is the inclusion in the .h file
include "C:\opencv\build\include\opencv2\core\types_c.h"
the error I am receiving is
error C1083: Cannot open source file: '..\MOSS\PedestrianDetection\DPD_Tracker.c': No such file or directory C:\Users\sankalp\Desktop\check\MOSS_Evaluation\c1 error LNK2001: unresolved external symbol _InitializeTracker C:\Users\sankalp\Desktop\check\MOSS\DPD_AlgorithmInit.obj error LNK2001: unresolved external symbol _DPD_Tracker C:\Users\sankalp\Desktop\check\MOSS\DPD_AlgorithmInit.obj error LNK2001: unresolved external symbol "unsigned char * __cdecl DPD_Alloc(unsigned int)" (?DPD_Alloc##YAPAEI#Z) C:\Users\sankalp\Desktop\check\MOSS\DPD_Tracker1.obj error LNK1120: 3 unresolved externals C:\Users\sankalp\Desktop\check\Release\MOSS.exe
Am I doing something wrong while including the .hpp file? Is there a better way to include opencv to allow compilation and linking? I have tried toggling the precompiled header usage settings in the project too but It did not help.

Can't debug my iOS project since updating to cocoa pods to use_frameworks! for Swift

After cocoapods 0.38.0 I updated my project to use_frameworks! so that I can make use of Swift modules.
Now whenever I try and debug via lldb I get the following error:
error: Error in auto-import:
failed to get module 'my-app-name' from AST context:
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "/Path/To/Project/Pods/Target Support Files/FBSDKCoreKit/FBSDKCoreKit-umbrella.h"
^
/Path/To/Project/Pods/Target Support Files/FBSDKCoreKit/FBSDKCoreKit-umbrella.h:6:9: note: in file included from /Path/To/Project/Pods/Target Support Files/FBSDKCoreKit/FBSDKCoreKit-umbrella.h:6:
#import "FBSDKAppLinkResolver.h"
^
/Path/To/Project/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkResolver.h:26:10: error: include of non-modular header inside framework module 'FBSDKCoreKit.FBSDKAppLinkResolver'
# import <Bolts/BFAppLinkResolving.h>
^
could not build Objective-C module 'FBSDKCoreKit'<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "/Path/To/Project/Pods/Target Support Files/FBSDKLoginKit/FBSDKLoginKit-umbrella.h"
^
/Path/To/Project/Pods/Target Support Files/FBSDKLoginKit/FBSDKLoginKit-umbrella.h:3:9: note: in file included from /Path/To/Project/Pods/Target Support Files/FBSDKLoginKit/FBSDKLoginKit-umbrella.h:3:
#import "FBSDKLoginButton.h"
^
A fatal parse error has occurred. LLDB may become unstable; please restart your debug session as soon as possible.
I did a bit of digging and found that if you set Allow Non-modular Includes in Framework Modules to yes for the FBSDKCoreKit target in the Pods project, that fixes the LLDB errors.

Unable to merge Unity 5 into our iOS application

We have a large and complicated application and we are looking to upgrade our 3d engine to Unity 5.0. But I am having trouble integrating Unity.
I been trying to follow these tutorials but constant errors keep poping up whatever I do.
http://www.the-nerd.be/2014/09/08/sandbox-unity-app-in-existing-ios-app/
http://www.makethegame.net/unity/add-unity3d-to-native-ios-app-with-unity-5-and-vuforia-4-x/
http://www.markuszancolo.at/2014/05/integrating-unity-into-a-native-ios-app/
If I just add the "Libraries" and the "Classes" folders into my project, I get an odd amount errors. It gets confused with other c code in the project(really doesn't like msgpack) and tries to import the wrong files (ILCPP files). If I remove all offending code from the project I still have a list of errors with the native cstring class.
CompileC
/Users/jess/Library/Developer/Xcode/DerivedData/CricHQ-bsrxghpplcwahnadlgmwxmzwbxff/Build/Intermediates/CricHQ.build/Debug-iphoneos/CricHQ.build/Objects-normal/armv7/main-5D1DD4E92C87F57A.o
Classes/Other/main.mm normal armv7 objective-c++
com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/jess/Projects/GIT/CricHQ-iPhone
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-x objective-c++ -arch armv7 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=c++11 -stdlib=libc++ -fobjc-arc -fmodules -fmodules-cache-path=/Users/jess/Library/Developer/Xcode/DerivedData/ModuleCache
-fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/jess/Library/Developer/Xcode/DerivedData/ModuleCache/Session.modulevalidation
-fmodules-validate-once-per-build-session -Wno-trigraphs -fpascal-strings -O0 -Werror=incompatible-pointer-types -Wmissing-field-initializers -Wmissing-prototypes -Wno-return-type -Wimplicit-atomic-properties -Wno-receiver-is-weak -Warc-repeated-use-of-weak -Wexplicit-ownership-type -Wimplicit-retain-self -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wexit-time-destructors -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wint-conversion -Wno-bool-conversion -Wenum-conversion -Wassign-enum -Wno-shorten-64-to-32 -Wno-newline-eof -Wno-selector -Wstrict-selector-match -Wno-undeclared-selector -Wdeprecated-implementations -Wc++11-extensions -DDEBUG=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk
-fstrict-aliasing -Wprotocol -Wdeprecated-declarations -Winvalid-offsetof -g -fvisibility=hidden -fvisibility-inlines-hidden -Wno-sign-conversion -miphoneos-version-min=7.0 -I/Users/jess/Library/Developer/Xcode/DerivedData/CricHQ-bsrxghpplcwahnadlgmwxmzwbxff/Build/Intermediates/CricHQ.build/Debug-iphoneos/CricHQ.build/CricHQ\
Next.hmap
-I/Users/jess/Library/Developer/Xcode/DerivedData/CricHQ-bsrxghpplcwahnadlgmwxmzwbxff/Build/Products/Debug-iphoneos/include
-I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
-I/Users/jess/Projects/GIT/CricHQ-iPhone/Libraries -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/libxml2
-I/Users/jess/Projects/GIT/CricHQ-iPhone/../CricHQ-3d/iOS-export/Classes
-I/Users/jess/Projects/GIT/CricHQ-iPhone/../CricHQ-3d/iOS-export/Libraries/bdwgc/include
-I/Users/jess/Projects/GIT/CricHQ-iPhone/../CricHQ-3d/iOS-export/Libraries/libil2cpp/include
-I/Users/jess/Projects/GIT/CricHQ-iPhone/../CricHQ-3d/iOS-export/Classes/Native
-I/Users/jess/Projects/GIT/CricHQ-iPhone/Libraries/CricEngine/source -I/Users/jess/Library/Developer/Xcode/DerivedData/CricHQ-bsrxghpplcwahnadlgmwxmzwbxff/Build/Intermediates/CricHQ.build/Debug-iphoneos/CricHQ.build/DerivedSources/armv7
-I/Users/jess/Library/Developer/Xcode/DerivedData/CricHQ-bsrxghpplcwahnadlgmwxmzwbxff/Build/Intermediates/CricHQ.build/Debug-iphoneos/CricHQ.build/DerivedSources
-F/Users/jess/Library/Developer/Xcode/DerivedData/CricHQ-bsrxghpplcwahnadlgmwxmzwbxff/Build/Products/Debug-iphoneos
-F/Users/jess/Projects/GIT/CricHQ-iPhone -mno-thumb -DINIT_SCRIPTING_BACKEND=1 -include /Users/jess/Projects/GIT/CricHQ-iPhone/Classes/Other/CricHQ_Prefix.pch
-MMD -MT dependencies -MF /Users/jess/Library/Developer/Xcode/DerivedData/CricHQ-bsrxghpplcwahnadlgmwxmzwbxff/Build/Intermediates/CricHQ.build/Debug-iphoneos/CricHQ.build/Objects-normal/armv7/main-5D1DD4E92C87F57A.d
--serialize-diagnostics /Users/jess/Library/Developer/Xcode/DerivedData/CricHQ-bsrxghpplcwahnadlgmwxmzwbxff/Build/Intermediates/CricHQ.build/Debug-iphoneos/CricHQ.build/Objects-normal/armv7/main-5D1DD4E92C87F57A.dia
-c /Users/jess/Projects/GIT/CricHQ-iPhone/Classes/Other/main.mm -o /Users/jess/Library/Developer/Xcode/DerivedData/CricHQ-bsrxghpplcwahnadlgmwxmzwbxff/Build/Intermediates/CricHQ.build/Debug-iphoneos/CricHQ.build/Objects-normal/armv7/main-5D1DD4E92C87F57A.o
In file included from :353: In file included from :4: In file included from
/Users/jess/Projects/GIT/CricHQ-iPhone/Classes/Other/CricHQ_Prefix.pch:6:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:18:
In file included from
/Users/jess/Projects/GIT/CricHQ-iPhone/Libraries/../../CricHQ-3d/iOS-export/Libraries/libil2cpp/include/os/Locale.h:4:
In file included from
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:436:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:70:9:
error: no member named 'memcpy' in the global namespace; did you mean
'wmemcpy'? using ::memcpy;
~~^ In file included from :353: In file included from :4: In file included from
/Users/jess/Projects/GIT/CricHQ-iPhone/Classes/Other/CricHQ_Prefix.pch:6:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:18:
In file included from
/Users/jess/Projects/GIT/CricHQ-iPhone/Libraries/../../CricHQ-3d/iOS-export/Libraries/libil2cpp/include/os/Locale.h:4:
In file included from
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:435:
In file included from
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:90:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/wchar.h:152:10:
note: 'wmemcpy' declared here wchar_t *wmemcpy(wchar_t * __restrict,
const wchar_t * __restrict, size_t);
^ In file included from :353: In file included from :4: In file included from
/Users/jess/Projects/GIT/CricHQ-iPhone/Classes/Other/CricHQ_Prefix.pch:6:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:18:
In file included from
/Users/jess/Projects/GIT/CricHQ-iPhone/Libraries/../../CricHQ-3d/iOS-export/Libraries/libil2cpp/include/os/Locale.h:4:
In file included from
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:436:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:71:9:
error: no member named 'memmove' in the global namespace; did you mean
'wmemmove'? using ::memmove;
~~^ In file included from :353: In file included from :4: In file included from
/Users/jess/Projects/GIT/CricHQ-iPhone/Classes/Other/CricHQ_Prefix.pch:6:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:18:
In file included from
/Users/jess/Projects/GIT/CricHQ-iPhone/Libraries/../../CricHQ-3d/iOS-export/Libraries/libil2cpp/include/os/Locale.h:4:
In file included from
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:435:
In file included from
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:90:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/wchar.h:153:10:
note: 'wmemmove' declared here wchar_t *wmemmove(wchar_t *, const
wchar_t *, size_t);
^ In file included from :353: In file included from :4: In file included from
/Users/jess/Projects/GIT/CricHQ-iPhone/Classes/Other/CricHQ_Prefix.pch:6:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:18:
In file included from
/Users/jess/Projects/GIT/CricHQ-iPhone/Libraries/../../CricHQ-3d/iOS-export/Libraries/libil2cpp/include/os/Locale.h:4:
In file included from
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:436:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:72:9:
error: no member named 'strcpy' in the global namespace using
::strcpy;
~~^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:73:9:
error: no member named 'strncpy' in the global namespace using
::strncpy;
~~^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:74:9:
error: no member named 'strcat' in the global namespace using
::strcat;
~~^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:75:9:
error: no member named 'strncat' in the global namespace using
::strncat;
~~^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:76:9:
error: no member named 'memcmp' in the global namespace; did you mean
'wmemcmp'? using ::memcmp;
~~^ In file included from :353: In file included from :4: In file included from
/Users/jess/Projects/GIT/CricHQ-iPhone/Classes/Other/CricHQ_Prefix.pch:6:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:18:
In file included from
/Users/jess/Projects/GIT/CricHQ-iPhone/Libraries/../../CricHQ-3d/iOS-export/Libraries/libil2cpp/include/os/Locale.h:4:
In file included from
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:435:
In file included from
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:90:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/wchar.h:151:5:
note: 'wmemcmp' declared here int wmemcmp(const wchar_t *, const
wchar_t *, size_t);
^ In file included from :353: In file included from :4: In file included from
/Users/jess/Projects/GIT/CricHQ-iPhone/Classes/Other/CricHQ_Prefix.pch:6:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:18:
In file included from
/Users/jess/Projects/GIT/CricHQ-iPhone/Libraries/../../CricHQ-3d/iOS-export/Libraries/libil2cpp/include/os/Locale.h:4:
In file included from
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:436:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:77:9:
error: no member named 'strcmp' in the global namespace using
::strcmp;
~~^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:78:9:
error: no member named 'strncmp' in the global namespace using
::strncmp;
~~^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:79:9:
error: no member named 'strcoll' in the global namespace; did you mean
'strtoll'? using ::strcoll;
~~^ In file included from :353: In file included from :4: In file included from
/Users/jess/Projects/GIT/CricHQ-iPhone/Classes/Other/CricHQ_Prefix.pch:6:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:13:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/assert.h:44:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/stdlib.h:169:3:
note: 'strtoll' declared here
strtoll(const char *, char **, int);
^ In file included from :353: In file included from :4: In file included from
/Users/jess/Projects/GIT/CricHQ-iPhone/Classes/Other/CricHQ_Prefix.pch:6:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:18:
In file included from
/Users/jess/Projects/GIT/CricHQ-iPhone/Libraries/../../CricHQ-3d/iOS-export/Libraries/libil2cpp/include/os/Locale.h:4:
In file included from
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:436:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:80:9:
error: no member named 'strxfrm' in the global namespace using
::strxfrm;
~~^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:82:9:
error: no member named 'memchr' in the global namespace; did you mean
'wmemchr'? using ::memchr;
~~^ In file included from :353: In file included from :4: In file included from
/Users/jess/Projects/GIT/CricHQ-iPhone/Classes/Other/CricHQ_Prefix.pch:6:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:18:
In file included from
/Users/jess/Projects/GIT/CricHQ-iPhone/Libraries/../../CricHQ-3d/iOS-export/Libraries/libil2cpp/include/os/Locale.h:4:
In file included from
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:435:
In file included from
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:90:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include/wchar.h:150:10:
note: 'wmemchr' declared here wchar_t *wmemchr(const wchar_t ,
wchar_t, size_t);
^ In file included from :353: In file included from :4: In file included from
/Users/jess/Projects/GIT/CricHQ-iPhone/Classes/Other/CricHQ_Prefix.pch:6:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:18:
In file included from
/Users/jess/Projects/GIT/CricHQ-iPhone/Libraries/../../CricHQ-3d/iOS-export/Libraries/libil2cpp/include/os/Locale.h:4:
In file included from
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:436:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:84:9:
error: no member named 'strchr' in the global namespace using
::strchr;
~~^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:86:9:
error: no member named 'strcspn' in the global namespace using
::strcspn;
~~^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:88:9:
error: no member named 'strpbrk' in the global namespace using
::strpbrk;
~~^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:90:9:
error: no member named 'strrchr' in the global namespace using
::strrchr;
~~^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:92:9:
error: no member named 'strspn' in the global namespace using
::strspn;
~~^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:94:9:
error: no member named 'strstr' in the global namespace using
::strstr;
~~^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:98:87:
error: no member named 'strchr' in the global namespace; did you mean
simply 'strchr'? inline _LIBCPP_INLINE_VISIBILITY char strchr(
char* __s, int __c) {return ::strchr(__s, __c);}
^~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:98:46:
note: 'strchr' declared here inline _LIBCPP_INLINE_VISIBILITY
char* strchr( char* __s, int __c) {return ::strchr(__s, __c);}
Screenshot:
Anyone know of a solution? Any help in this matter would be great as I'm totally stuck on what I should try next.
Edit: A plain project worked, so that is a start. Sounds like one of libraries is interfering maybe. The code base is large so need help narrowing the issue down.
Edit 2: Updated to Unity 5.1, xcode 7 beta, clean, deleted the DerivedData folder and still no change.
Once I added "-ferror-limit=1000" then I saw 999+ errors instead of 30.
Common errors:
"Declaration conflicts with target of using declaration already in scope".
"Call to 'X' is ambiguous" (cos, exp, ceil)
"Could not build module 'X'" (Foundation, Darwin)
"No member named 'X" in namespace" (memset, memcpy, memmove)
"Use of undeclared identifier 'x'" (strdup)
"Expected ';' after top level declarator"
Edit 3:
I solve the errors by setting "Always Search User Paths" to "No" in the XCode project settings.
But I'm having a few other issues.
Unity is still using CPU when I pause it. Is there anyway to solve this? I am calling Unity's "applicationDidBecomeActive" method. I also tried just calling "UnityPause".
Calling Unity's "GetAppController()" in my own code causes this error:
Undefined symbols for architecture armv7:
"_GetAppController", referenced from:
-[Test3d viewDidDisappear:] in Test3d.o
ld: symbol(s) not found for architecture armv7
I dont have enough reputation here to comment, so i write it as an answer:
After 3 Edits i am not sure what problems are still left...
GetAppController is an inline function in UnityAppController.h If it isnt linked to you project, you probably didnt include the file (but instead only declared GetAppController() somewhere yourself).
The other errors looks like you have conflicts with the basic c-libs. Is your other code using the c++ std lib? and if yes, which one? Which one is stated in Your BuildSettings under "C++ Standard Library"? It should be libc++
The "Solution" to switch "Always Search User Paths" to "No" sounds even more like a problem with other included projects.
Most of my answers are in the question. The core solution was setting "Always Search User Paths" to "No" in the XCode project settings.
As for the last edit, I believe they are bugs. I don't use GetAppController, instead I have my own method. I have reported the CPU issue, it isn't a major problem as it is only ~3% on phones and ipads.
I've this problem too recently trying to integrate my Unity 5 project into an existing iOS project.
How I managed to integrate is
1) Drag Class and Libraries files from your Unity project into your iOS project. Same like the tutorial from the-nerd. Uncheck copy items, and select create group radio box.
2) Update your Header Search Path and Library Search Path under Build Settings. The folders should point to your Unity project folder.
Header Search Path -> Unity's Classes folder
Library Search Path -> Unity's Library folder
This part is really important, it made me solve those errors.
3) Under Build Phases, remember to create a run script and make sure the script points to the correct path in Unity's Data folder.
rm -rf "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Data"
cp -Rf "$PROJECT_DIR/../CHANGE THIS TO YOU PATH/Data" "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Data"
4) Compare the Build Settings from the Unity's project and your current iOS project. Make sure you select the correct C++ and C compiler. Your iOS project should match the one of Unity. Also the Linker Flag have to be in the correct order.
-weak_framework
CoreMotion
-weak-lSystem
That is all I did to make my iOS project compile with the Unity project I have. I hope it helps.

Using cpp-netlib on iOS Developpement

I'm building a crossplateform application and I'm trying to do some network request using cpp-netlib on ios. So far so good, until I use the call back function of cpp-netlib to avoid waiting for an answer (and froze my user interface).
But when I tried to compile, I had an error I don't succeed to fix in Xcode.
No member named 'forward' in namespace 'std'
This error come from a deconstruct.hpp file of boost library. How can I fix it ?
I'm already compiling my application using GNU++11 (C++ Language Dialect) and libstdc++ (C++ Standart Library).
edit
I fixed the bug of std::forward by compiling with libc++ rather than libstdc++ (which include gnu). But i'm running against several error in boost file again.
If you want to have a look:
In file included from /Users/paris_j/Speechi/JeLèveLaMain/jllm-ios/jelevelamain/jelevelamain/AppDelegate.m:11:
In file included from ../../jllm-core/include/model/Model.hh:18:
In file included from ../../jllm-core/include/model/NetworkModel.hpp:11:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/client.hpp:13:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/request.hpp:18:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/message/wrappers/uri.hpp:10:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/uri/uri.hpp:359:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/uri/accessors.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/include/qi.hpp:16:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/action.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/action/action.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/meta_compiler.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/meta_compiler.hpp:20:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:17:
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/detail/make_cons.hpp:45:48: error: expected a type
template <typename Car, typename Cdr = fusion::nil>
^
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/detail/make_cons.hpp:45:48: error: expected ',' or '>' in template-parameter-list
In file included from /Users/paris_j/Speechi/JeLèveLaMain/jllm-ios/jelevelamain/jelevelamain/AppDelegate.m:11:
In file included from ../../jllm-core/include/model/Model.hh:18:
In file included from ../../jllm-core/include/model/NetworkModel.hpp:11:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/client.hpp:13:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/request.hpp:18:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/message/wrappers/uri.hpp:10:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/uri/uri.hpp:359:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/uri/accessors.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/include/qi.hpp:16:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/action.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/action/action.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/meta_compiler.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/meta_compiler.hpp:20:
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:65:37: error: too few template arguments for class template 'make_cons'
typedef typename result_of::make_cons<value>::type elements;
^
In file included from /Users/paris_j/Speechi/JeLèveLaMain/jllm-ios/jelevelamain/jelevelamain/AppDelegate.m:11:
In file included from ../../jllm-core/include/model/Model.hh:18:
In file included from ../../jllm-core/include/model/NetworkModel.hpp:11:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/client.hpp:13:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/request.hpp:18:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/message/wrappers/uri.hpp:10:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/uri/uri.hpp:359:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/uri/accessors.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/include/qi.hpp:16:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/action.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/action/action.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/meta_compiler.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/meta_compiler.hpp:20:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:17:
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/detail/make_cons.hpp:46:16: note: template is declared here
struct make_cons
^
In file included from /Users/paris_j/Speechi/JeLèveLaMain/jllm-ios/jelevelamain/jelevelamain/AppDelegate.m:11:
In file included from ../../jllm-core/include/model/Model.hh:18:
In file included from ../../jllm-core/include/model/NetworkModel.hpp:11:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/client.hpp:13:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/request.hpp:18:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/message/wrappers/uri.hpp:10:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/uri/uri.hpp:359:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/uri/accessors.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/include/qi.hpp:16:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/action.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/action/action.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/meta_compiler.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/meta_compiler.hpp:20:
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:65:55: error: expected a qualified name after 'typename'
typedef typename result_of::make_cons<value>::type elements;
^
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:65:59: error: expected ';' at end of declaration list
typedef typename result_of::make_cons<value>::type elements;
^
;
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:73:40: error: use of undeclared identifier 'elements'
result<make_component_(elements, Data)>::type
^
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:73:58: error: non-friend class member 'type' cannot have a qualified name
result<make_component_(elements, Data)>::type
~~^
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:73:58: error: typedef declarator cannot be qualified
result<make_component_(elements, Data)>::type
~~^
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:73:62: error: expected ';' at end of declaration list
result<make_component_(elements, Data)>::type
^
;
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:76:9: error: unknown type name 'result_type'
result_type operator()(
^
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:94:37: error: too few template arguments for class template 'make_cons'
typedef typename result_of::make_cons<value>::type elements;
^
In file included from /Users/paris_j/Speechi/JeLèveLaMain/jllm-ios/jelevelamain/jelevelamain/AppDelegate.m:11:
In file included from ../../jllm-core/include/model/Model.hh:18:
In file included from ../../jllm-core/include/model/NetworkModel.hpp:11:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/client.hpp:13:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/request.hpp:18:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/message/wrappers/uri.hpp:10:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/uri/uri.hpp:359:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/uri/accessors.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/include/qi.hpp:16:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/action.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/action/action.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/meta_compiler.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/meta_compiler.hpp:20:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:17:
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/detail/make_cons.hpp:46:16: note: template is declared here
struct make_cons
^
In file included from /Users/paris_j/Speechi/JeLèveLaMain/jllm-ios/jelevelamain/jelevelamain/AppDelegate.m:11:
In file included from ../../jllm-core/include/model/Model.hh:18:
In file included from ../../jllm-core/include/model/NetworkModel.hpp:11:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/client.hpp:13:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/request.hpp:18:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/message/wrappers/uri.hpp:10:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/uri/uri.hpp:359:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/uri/accessors.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/include/qi.hpp:16:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/action.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/action/action.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/meta_compiler.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/meta_compiler.hpp:20:
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:94:55: error: expected a qualified name after 'typename'
typedef typename result_of::make_cons<value>::type elements;
^
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:94:59: error: expected ';' at end of declaration list
typedef typename result_of::make_cons<value>::type elements;
^
;
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:99:40: error: use of undeclared identifier 'elements'
result<make_component_(elements, Data)>::type
^
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:99:58: error: non-friend class member 'type' cannot have a qualified name
result<make_component_(elements, Data)>::type
~~^
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:99:58: error: typedef declarator cannot be qualified
result<make_component_(elements, Data)>::type
~~^
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:99:62: error: expected ';' at end of declaration list
result<make_component_(elements, Data)>::type
^
;
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:102:9: error: unknown type name 'result_type'
result_type operator()(
^
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:147:28: error: too few template arguments for class template 'make_cons'
result_of::make_cons<child_component>::type
^
In file included from /Users/paris_j/Speechi/JeLèveLaMain/jllm-ios/jelevelamain/jelevelamain/AppDelegate.m:11:
In file included from ../../jllm-core/include/model/Model.hh:18:
In file included from ../../jllm-core/include/model/NetworkModel.hpp:11:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/client.hpp:13:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/request.hpp:18:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/message/wrappers/uri.hpp:10:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/uri/uri.hpp:359:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/uri/accessors.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/include/qi.hpp:16:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/action.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/action/action.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/meta_compiler.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/meta_compiler.hpp:20:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:17:
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/detail/make_cons.hpp:46:16: note: template is declared here
struct make_cons
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]

Resources