So I'm trying to compile a C code but I keep getting this error. After reading a lot of older posts with this issue I'm not really understanding the jargon so the solutions are going over my head. The command I use is /usr/local/bin/gcc-9 -I/usr/local/include/ ARES_v2.c
The error I get is pretty long
Undefined symbols for architecture x86_64:
"_ffclos", referenced from:
_read_fits_file in ccKuUiJh.o
"_ffgipr", referenced from:
_read_fits_file in ccKuUiJh.o
"_ffgky", referenced from:
_read_fits_file in ccKuUiJh.o
"_ffgpxv", referenced from:
_read_fits_file in ccKuUiJh.o
"_ffopentest", referenced from:
_read_fits_file in ccKuUiJh.o
"_ffrprt", referenced from:
_read_fits_file in ccKuUiJh.o
"_gsl_blas_dnrm2", referenced from:
_fitngauss in ccKuUiJh.o
And it keeps going from there. I can attach the code I'm trying to compile but it's pretty long so hopefully the error itself can shed some light. If anything else needs added I certainly can add it.
Related
I've built an app in Unity and have installed the Firebase SDK for authentication, analytics, and the database. The build process works just fine in Unity. No errors at all. However, when I open up the project in Xcode and try to archive it, I get these errors:
ld: warning: arm64 function not 4-byte aligned: _unwind_tester from /Users/michael/Desktop/Reserve1/Libraries/libiPhone-lib.a(unwind_test_arm64.o)
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_FIRApp", referenced from:
objc-class-ref in libFirebaseCppApp.a(app_ios.mm.o)
"_OBJC_CLASS_$_FIRTransactionResult", referenced from:
objc-class-ref in libFirebaseCppDatabase.a(database_reference_ios.mm.o)
"_OBJC_CLASS_$_FIRTransactionResult", referenced from:
objc-class-ref in libFirebaseCppDatabase.a(database_reference_ios.mm.o)
"_OBJC_CLASS_$_FIRDatabase", referenced from:
objc-class-ref in libFirebaseCppDatabase.a(database_ios.mm.o)
"_OBJC_CLASS_$_FIRGameCenterAuthProvider", referenced from:
objc-class-ref in libFirebaseCppAuth.a(credential_ios.mm.o)
"_OBJC_CLASS_$_FIRGoogleAuthProvider", referenced from:
objc-class-ref in libFirebaseCppAuth.a(credential_ios.mm.o)
"_OBJC_CLASS_$_FIRPhoneAuthProvider", referenced from:
objc-class-ref in libFirebaseCppAuth.a(credential_ios.mm.o)
"_OBJC_CLASS_$_FIRPhoneAuthCredential", referenced from:
objc-class-ref in libFirebaseCppAuth.a(user_ios.mm.o)
"_OBJC_CLASS_$_FIROptions", referenced from:
objc-class-ref in libFirebaseCppApp.a(app_ios.mm.o)
"_OBJC_CLASS_$_FIROAuthProvider", referenced from:
objc-class-ref in libFirebaseCppAuth.a(credential_ios.mm.o)
"_OBJC_CLASS_$_FIRConfiguration", referenced from:
objc-class-ref in libFirebaseCppApp.a(app_ios.mm.o)
"_OBJC_CLASS_$_FIRFacebookAuthProvider", referenced from:
objc-class-ref in libFirebaseCppAuth.a(credential_ios.mm.o)
"_OBJC_CLASS_$_FIRDatabaseReference", referenced from:
objc-class-ref in libFirebaseCppDatabase.a(database_reference_ios.mm.o)
"_OBJC_CLASS_$_FIREmailAuthProvider", referenced from:
objc-class-ref in libFirebaseCppAuth.a(credential_ios.mm.o)
"_OBJC_CLASS_$_FIRGitHubAuthProvider", referenced from:
objc-class-ref in libFirebaseCppAuth.a(credential_ios.mm.o)
"_OBJC_CLASS_$_FIRTwitterAuthProvider", referenced from:
objc-class-ref in libFirebaseCppAuth.a(credential_ios.mm.o)
"_OBJC_CLASS_$_FIRAuth", referenced from:
objc-class-ref in libFirebaseCppAuth.a(auth_ios.mm.o)
"_FIRAuthErrorUserInfoUpdatedCredentialKey", referenced from:
firebase::auth::SignInResultCallback(FIRAuthDataResult*, NSError*, firebase::SafeFutureHandle<firebase::auth::SignInResult>, firebase::auth::AuthData*) in libFirebaseCppAuth.a(auth_ios.mm.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've tried almost everything, including:
Cocoapod install/delete/reinstall
IOS Resolver settings changes
SDK Reinstalls on both Unity and Xcode
Editing Pod File in multiple ways
Following every article instructions I came across
I'm using Unity version 2020.3.36f1 and Xcode version 13.4.1
Yet after following solutions on multiple websites including this one for hours, nothing seems to work. I know there's a way. I just can't seem to figure it out.
Please help .
After over 10 hours of research and trial and error I've found the solution. This is probably going to answer hundreds of questions I've seen all over the place that have not been answered. Here we go:
On Mac the issue for me was the Cocoapods failing when trying to Build and Run. Which created all of the errors in Xcode.
Step By Step:
Open your Xcode project. (Leave open the entire time)
Locate your Xcode project folder in Finder.
Right click on the folder and select "New Terminal at Folder"
If you have an M1 chip type "sudo arch -x86_64 gem install ffi" then "arch -x86_64 pod install" Other wise for Intel "pod install".
You should now see a bunch of green! All of the gems for the framework should be installed.
You will then have a workspace project in your build folder from unity and you can fully build your project in Xcode without it failing.
Hope this helps!
I am working on a flutter project. My project includes tflite and amplify packages. it works fine with android but whenever I try to build it in Xcode I am getting this following errors:
Undefined symbols for architecture arm64:
"OBJC_CLASS$_FlutterStandardTypedData", referenced from:
objc-class-ref in tflite(TflitePlugin.o)
enter code here
"_FlutterMethodNotImplemented", referenced from:
-[TflitePlugin handleMethodCall:result:] in tflite(TflitePlugin.o)
"OBJC_CLASS$_FlutterMethodChannel", referenced from:
objc-class-ref in tflite(TflitePlugin.o)
"OBJC_METACLASS$_FlutterAppDelegate", referenced from:
OBJC_METACLASS$_AppDelegate in AppDelegate.o
"OBJC_CLASS$_FlutterAppDelegate", referenced from:
OBJC_CLASS$_AppDelegate in AppDelegate.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Please help me with this. I have been stuck with this issue for more than a week now. Thank you.
I have added a snippet from Xcode which shows the current settings for Architectures. There are past suggestions to add arm64 as a Valid architectures. However, as you see there is no option for that. I added arm64 in excluded architectures as shown in the picture. It didn't work for me.
I'm using Simple IAP and OpenIAB system.
I have no problem Android system but i tried Xcode for IOS I have an error.
I added StoreKit framework.
"_Inventory_removePurchase", referenced from:
RegisterMonoModules() in RegisterMonoModules.o
"_Inventory_query", referenced from:
RegisterMonoModules() in RegisterMonoModules.o
"_AppStore_requestProducts", referenced from:
RegisterMonoModules() in RegisterMonoModules.o
"_Inventory_hasPurchase", referenced from:
RegisterMonoModules() in RegisterMonoModules.o
"_AppStore_startPurchase", referenced from:
RegisterMonoModules() in RegisterMonoModules.o
"_AppStore_restorePurchases", referenced from:
RegisterMonoModules() in RegisterMonoModules.o
http://i.stack.imgur.com/v0Uik.png
How can I fix this? Thanks.
Ensure you have added the following files to your project:
AppStoreBridge.mm, AppStoreDelegate.h,
AppStoreDelegate.mm
Without these files present, you will encounter the above framework errors when trying to build.
I have tried removig the following error by following many solutions here and on other forums.
Undefined symbols for architecture armv7:
"_kABPersonPhoneProperty", referenced from:
+[InviteHelpers findPhoneNumbersForContact:] in libMedioEvent.a(InviteHelpers.o)
"_ABPersonCopyArrayOfAllLinkedPeople", referenced from:
_CopyValuesFromLinkedContact in libMedioEvent.a(InviteHelpers.o)
"_ABMultiValueCopyLabelAtIndex", referenced from:
_CopyValuesFromLinkedContact in libMedioEvent.a(InviteHelpers.o)
"_ABMultiValueAddValueAndLabel", referenced from:
_CopyValuesFromLinkedContact in libMedioEvent.a(InviteHelpers.o)
"_ABMultiValueCopyValueAtIndex", referenced from:
+[InviteHelpers findEmailsForContact:] in libMedioEvent.a(InviteHelpers.o)
+[InviteHelpers findPhoneNumbersForContact:] in libMedioEvent.a(InviteHelpers.o)
_CopyValuesFromLinkedContact in libMedioEvent.a(InviteHelpers.o)
+[InviteHelpers findContactTwitter:] in libMedioEvent.a(InviteHelpers.o)
I have already included the MedioEvent SDK and its precompiled source in the project, and also included it in Framework and Library search paths. What bothers me is that it is coming from inside libMedioEvent.o.
Do I have to include "InviteHelpers" sdk as well?
I've created a clean build of libmariadbclient and integrated it into my project. Whenever I try to build said project I fail with an error:
Undefined symbols for architecture x86_64:
"_libiconv", referenced from:
_mariadb_convert_string in libmariadbclient.a(my_charset.c.o)
"_libiconv_close", referenced from:
_mariadb_convert_string in libmariadbclient.a(my_charset.c.o)
"_libiconv_open", referenced from:
_mariadb_convert_string in libmariadbclient.a(my_charset.c.o)
ld: symbol(s) not found for architecture x86_64
I then add libiconvlib.dylid to my project, cleaned it and tried to build again, but I still get the same error. Any ideas?
I filed a bug report with the developers and the issue was promptly fixed.