Builderror after upgrading to xcode4.3.2 from xcode3.2 - macos

We have upgraded our xcode to 4.3 recently.
I am into testing, I need to duplicate target file and integrate FoneMonkey files and execute the target.
I did below changes to orginal target to get it executed successfully:
updated framework serch paths
"$(DEVELOPER_FRAMEWORKS_DIR)"
"$(SRCROOT)/../../Developer/Library/Frameworks"
"$(SRCROOT)"
updated Library search paths
"$(DEVELOPER_FRAMEWORKS_DIR)"
"$(SRCROOT)/../../Developer/Library/Frameworks"
"$(SRCROOT)"
"/users/ezprintsqa/FoneMonkey/lib"
executed below command
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
Now build gets executed successfully.
But the duplicate target with Fonemonkey files added gives below errors:
Ld "/Users/ezprintsqa/Library/Developer/Xcode/DerivedData/SnapCards-dtjqrhfvqueyhrbbgjgydberyqdm/Build/Products/Debug-iphonesimulator/SnapCards copy.app/SnapCards copy" normal i386
cd /Users/ezprintsqa/Documents/snapcards
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.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 -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -L/Users/ezprintsqa/Library/Developer/Xcode/DerivedData/SnapCards-dtjqrhfvqueyhrbbgjgydberyqdm/Build/Products/Debug-iphonesimulator -L/Applications/Xcode.app/Contents/Developer/Library/Frameworks -L/Applications/Xcode.app/Contents/Developer/Library/Frameworks/CPlusTest.framework -L/Applications/Xcode.app/Contents/Developer/Library/Frameworks/DTPerformanceSession.framework -L/Applications/Xcode.app/Contents/Developer/Library/Frameworks/InterfaceBuilderKit.framework -L/
.
.
ld: warning: directory not found for option '-L/Users/ezprintsqa/Documents/snapcards/../../Developer/Library/Frameworks'
ld: warning: directory not found for option '-F/Users/ezprintsqa/Documents/snapcards/../../Developer/Library/Frameworks'
Undefined symbols for architecture i386:
"_SCNetworkReachabilitySetCallback", referenced from:
-[Reachability startNotifier] in Reachability.o
"_SCNetworkReachabilityScheduleWithRunLoop", referenced from:
-[Reachability startNotifier] in Reachability.o
"_SCNetworkReachabilityUnscheduleFromRunLoop", referenced from:
-[Reachability stopNotifier] in Reachability.o
"_SCNetworkReachabilityCreateWithName", referenced from:
+[Reachability reachabilityWithHostName:] in Reachability.o
"_SCNetworkReachabilityCreateWithAddress", referenced from:
+[Reachability reachabilityWithAddress:] in Reachability.o
"_SCNetworkReachabilityGetFlags", referenced from:
-[Reachability currentReachabilityStatus] in Reachability.o
-[Reachability isReachable] in Reachability.o
-[Reachability isConnectionRequired] in Reachability.o
-[Reachability isConnectionOnDemand] in Reachability.o
-[Reachability isInterventionRequired] in Reachability.o
-[Reachability isReachableViaWWAN] in Reachability.o
-[Reachability isReachableViaWiFi] in Reachability.o
...
"_OBJC_CLASS_$_SenTestSuite", referenced from:
objc-class-ref in libFoneMonkeyOCUnit.5.5b.a(FoneMonkey+OCUnit.o)
"_OBJC_CLASS_$_SenTestObserver", referenced from:
objc-class-ref in libFoneMonkeyOCUnit.5.5b.a(FoneMonkey+OCUnit.o)
"_OBJC_CLASS_$_SenTestLog", referenced from:
objc-class-ref in libFoneMonkeyOCUnit.5.5b.a(FoneMonkey+OCUnit.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Can some one please help me with below issues:
The folder /Users/ezprintsqa/Library/Developer/ is not available now after upgrading to 4.3, but here this path is being configured (how can i change this)?
The _objc_class issues.
Thanks in Advance.

By removing SenTesting.framework from Xcode the issue was solved.

Related

Red folders coming in Cordova project in Xcode 12.5.1

I am getting red folder in XCode. Folders name are Classes, plugins, Other sources and Resources. I have tried Giving path of the folders under Identity and Type section in the right side. On doing this i get
"No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=arm64 arm64e)".
For this, I tried Build active architecture only to yes and no(tried both). And added VALID_ARCHS = arm64 arm64e armv7 armv7s x86_64. And doing this further gives the below error
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_OCFMenuHandler", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$__TtC11OCFramework17GlobalMenuManager", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$__TtC11OCFramework15DeepLinkManager", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_OCKMFLoginHandler", referenced from:
objc-class-ref in LoginViewController.o
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am using XCode Version 12.5.1

Cannot create a build archive in Flutter

When creating a build archive in Xcode, get these error messages. But I can run the app in my iOS device.
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_FlutterAppDelegate", referenced from:
_OBJC_CLASS_$_AppDelegate in AppDelegate.o
"_FlutterMethodNotImplemented", referenced from:
-[FLTFirebaseAdMobPlugin handleMethodCall:result:] in libfirebase_admob.a(FirebaseAdMobPlugin.o)
-[LocationPlugin handleMethodCall:result:] in liblocation.a(LocationPlugin.o)
___52+[FLTSharedPreferencesPlugin registerWithRegistrar:]_block_invoke in libshared_preferences.a(SharedPreferencesPlugin.o)
"_OBJC_CLASS_$_FlutterError", referenced from:
objc-class-ref in libfirebase_admob.a(FirebaseAdMobPlugin.o)
"_OBJC_CLASS_$_FlutterMethodChannel", referenced from:
objc-class-ref in libfirebase_admob.a(FirebaseAdMobPlugin.o)
objc-class-ref in liblocation.a(LocationPlugin.o)
objc-class-ref in libshared_preferences.a(SharedPreferencesPlugin.o)
"_OBJC_CLASS_$_FlutterEventChannel", referenced from:
objc-class-ref in liblocation.a(LocationPlugin.o)
"_OBJC_METACLASS_$_FlutterAppDelegate", referenced from:
_OBJC_METACLASS_$_AppDelegate in AppDelegate.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
It seems that you are missing armv7 support in your Flutter.framework.That's why you could run on your arm64 device but failed to archive for generic devices. Follow these instructions to produce a Flutter.framework that supports armv7. Armv7 build instructions. And take a look at this issue might help.

Linking error - Undefined symbols for architecture x86_64 on OSX

The following is returned when trying to compile part of a project under OSX:
gcc -g -pipe -L/Projects/export buf_test.o buf.o -framework CoreFoundation -o buf_test
Undefined symbols for architecture x86_64:
"___assert_rtn", referenced from:
_init in buf.o
_get in buf.o
_put in buf.o
"___sprintf_chk", referenced from:
_test in buf_test.o
"___strcpy_chk", referenced from:
_test_data_copy in buf_test.o
___inline_strcpy_chk in buf_test.o
"_exit", referenced from:
start in crt1.10.6.o
"_printf", referenced from:
_test in buf_test.o
"_puts", referenced from:
_test in buf_test.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
Help would be much appreciated!
Turns out it was a library naming conflict with the standard libraries -- I had a library called libSystem.a in /Projects/export which was masking libSystem.dylib from being found.

Meaning of XCode clang error "not found in architecture i386"

I'm not sure what these errors mean or what to do about them. I moved a folder and some files around in Finder, and then added them back to my project.
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_IASKSettingsReader", referenced from:
objc-class-ref in IASKAppSettingsViewController.o
"_OBJC_CLASS_$_IASKSettingsStoreUserDefaults", referenced from:
objc-class-ref in IASKAppSettingsViewController.o
"_OBJC_CLASS_$_IASKSpecifierValuesViewController", referenced from:
objc-class-ref in IASKAppSettingsViewController.o
"_OBJC_CLASS_$_IASKPSTitleValueSpecifierViewCell", referenced from:
objc-class-ref in IASKAppSettingsViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This is followed by these error messages (which I can't copy as text)
I had just compiled successfully before the files were moved and added.
The class IASKSettingsReader/IASKSettingsStoreUserDefaults/... is not being linked. Please check that you have it included on your Xcode project and in the Build Phases of your project under Compile Sources, if not add them.

Compiling C/C++ application using SDL in OS X, linking problem

I'm trying to compile a C/C++ program that uses SDL on a OS X 10.6.8 but I'm having some errors on the linking stage, the code compiles but fails to like due to some missing symbols. The error is:
Undefined symbols for architecture x86_64:
"_CFBundleGetMainBundle", referenced from:
-[SDLMain setupWorkingDirectory:] in libSDLmain.a(SDLMain.o)
_main in libSDLmain.a(SDLMain.o)
"_CFBundleCopyBundleURL", referenced from:
-[SDLMain setupWorkingDirectory:] in libSDLmain.a(SDLMain.o)
"_CFURLCreateCopyDeletingLastPathComponent", referenced from:
-[SDLMain setupWorkingDirectory:] in libSDLmain.a(SDLMain.o)
"_CFURLGetFileSystemRepresentation", referenced from:
-[SDLMain setupWorkingDirectory:] in libSDLmain.a(SDLMain.o)
"_CFRelease", referenced from:
-[SDLMain setupWorkingDirectory:] in libSDLmain.a(SDLMain.o)
...
"_OBJC_CLASS_$_NSAutoreleasePool", referenced from:
objc-class-ref in libSDLmain.a(SDLMain.o)
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [dist/linwarrior] Error 1
I checked with the file command and the libraries are either x86_64 only or universal with both i386 and x86_64 versions.
Is there a way for me to determine what exactly is causing this error? A way to check the libs that are being included or any way to help debug the problem?
I don't know if it helps but this is what my Makefile creates, I removed file names to make it short, and the KNT flag is just something I'm using for preprocessor conditions:
/opt/local/bin/g++-mp-4.5 -DKNT=1 -Wp,-M,-MP,-MT,-MF, -std=c++0x -Wall -I source -O1 -funroll-loops -c -o
Thanks.

Resources