I have an error when i try to execute my app with QTCreator 5 :
dyld: Library not loaded: /usr/local/Qt-5.2.0/lib/QtWidgets.framework/Versions/5/QtWidgets
Referenced from: /projets/mcs_control/QT5/build-mcs_control-Desktop_Qt_5_2_0_clang_64bit-Debug/mcs_control.app/Contents/MacOS/mcs_control
Reason: image not found
My libraries installation directory is not the same. How to fix this problem ?
Regards,
laurent
I found two ways of solving this problem.
First, the ugly one:
ln -s /Users/MYUSERNAME/Qt/5.2.0/clang_64/ /usr/local/Qt-5.2.0
/Users/MYUSERNAME/Qt is place where I installed Qt.
Other way is by using otool and install_name_tool. This answer helped greatly.
Related
I m trying to add Firebase Analytic and Firebase Crashlytics using Swift package manager here is a link of git for firebase SDK
https://github.com/firebase/firebase-ios-sdk
after that I add this two line in my AppDelegate file
#import <FirebaseCore/FIRApp.h>
#import <Firebase.h>
All fine until when I add this [FIRApp configure]; getting error
Undefined symbols for architecture arm64:
"OBJC_CLASS$_FIRApp", referenced from:
objc-class-ref in HWOFAppDelegate.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I go thought every link of stack-overflow for similar problem try every solution but nothing help me like change Other Linker Flag etc...
Please help me..I really appreciate...I m using Xcode 12.1 with Objective-C
here is a screenshot of error which i m getting
And screenshot of added dependency
After so much searched I solved issue. Solution is
"$(inherited)" In Other Linker Flags
Build Active Architecture Only value to "Yes"
Add Run Script for firebase SPM is "${BUILD_DIR%Build/*}SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run"
Clean project
Build Project
I got the same issue while integrating MLKit in my recent work. The app was running fine on simulator as well as device but when I tried to archive the build it started throwing me error below-:
Undefined symbol: _OBJC_CLASS_$_MLKFaceDetector
I am using the MLKFaceDetector object in my files.
Resolution:-
Go to Build Settings -> Architectures -> Replace standard architectures with arm64. Also, make sure there is no space between arm & 64.
Reason what I understood is MLKit only supports 64 bit not 32 bit and since we are using standard architectures targeting both 32 and 64 bit, so Xcode while archiving for 32 bit is unable to find MLKit files. So we are explicitly saying Xcode to Archive only for 64 bit and not 32 bit.
Cons - It will not support some of the older iOS devices.
Finally I found the solution for this
For me changing ios deployment target to higher version than before workd.Mine was 9.0 I changed it to 13 .
Target-general- deployment info
Can try this it Will help,
Change Linking -> Mach-O Type to Dynamic Library, for the frameworks you used, then it works fine.
I'm trying to publish an .ipa file using Adobe AIR via Animate and have started getting this error:
Invalid input.
ld: library not found for -lclang_rt.ios
Would anyone have an idea what this might be related to?
Thanks
To update the SDK you will need to copy the library libclang_rt.ios.a into your AIR SDK and place it at: [AIR_SDK]/lib/aot/lib
You can grab the library file here: https://www.dropbox.com/s/kvhk8yxxomy3tpn/libclang_rt.ios.a?dl=0
Or from your Xcode installation:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/*/lib/darwin/libclang_rt.ios.a
If you don’t do this correctly, you will see something like the following error when packaging:
ld: library not found for -lclang_rt.ios
Compilation failed while executing : ld64
When I try to build my project, I get the following issue.
ld: library not found for -lcrypto
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Before the latest Xcode update, I was using OpenSSL via CocoaPods just fine. After the latest OS and Xcode update, I can't seem to be able to build OpenSSL.
Any ideas how to solve this? On Xcode 7 everything was working ok.
Found a solution, turns out, I needed to update the CocoaPods as well as my Pods.
For Mac OS X:
pod 'OpenSSL-OSX'
Other versions of OpenSSL do not work.
I struggled with this for a long time.
I finally fixed it by adding the following path to Build Settings: Library Search Paths
$(SRCROOT)/../../openssl-1.0.1s-MacOSX/lib
Your folder path is probably different. I pressed the plus button and dragged the lib folder from the OpenSSL folder to it.
I am sure I had tried this multiple times without success, but it seems to fix it now.
I am am trying to cross-compile an x86 program for alpha using g++. For that, I tried both "-static-libgcc" and "--static" options when linking the object file with libraries to generate the binaries. The cross compilation was successful, however I got the following errors when I ran the binaries on alpha machine:
./word_count: /lib/libc.so.6.1: version GLIBC_2.4' not found (required by ./word_count)
./word_count: /usr/lib/libstdc++.so.6: versionGLIBCXX_3.4.10' not found (required by ./word_
These errors shouldn't happen, since I am using static linking! So, I cannot figure out why I am getting these errors! Any help is appreciated.
You need to link against both, standard C and C++ libraries. (source)
There is some linker issue while compiling a cpp program
I use g++ and ubuntu 12.04
Installed uhd from repo.
libuhd.so file is located in /usr/lib
Now my question is
1.For linking uhd I used -luhd,but that gives me an error
undefined reference to `uhd::set_thread_priority_safe(float, bool)'
Should I add library path of libuhd to LD_LIBRARY_PATH?
I did that by the command
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/libuhd.so
After this I tried compiling again but same error?
It would be great if you could help me
Thanks
Is uhd::set_thread_priority_safe the only UHD function you are calling in your entire program? It is strange that that is the only undefined reference you are seeing from your program. If it is the only function in there, then it simply isn't finding the library. If it isn't, it sounds like the UHD version you have is strange.
Have you tried doing a:
$ sudo ldconfig
...after adding the library path to /etc/ld.so.conf?
When you say you installed it from the repo, what repo are you referring to? What distro are you running?