These frameworks work within another project but when creating a new project, it errors. The new project is blank and it fails because I import the frameworks. I am clicking and dragging the frameworks into Xcode.
Xcode 8.3.2 & Xcode 7.3.1
Apple Mach-O Linker (ld) Error Group
clang: error: linker command failed with exit code 1 (use -v to see invocation)
These are my frameworks:
Screenshot 3
I have tried:
Recreating the project
Readding the frameworks
Set Build Settings -> Framework Search Paths -> $(PROJECT_DIR) to recursive
Checked frameworks added to Build Settings -> Link Binary With Libraries
Clean & Clean Build Folder
Related
I'm attempting to create a Share Extension in a React Native application.
At compilation time, I'm running into the following error:
Apple Mach-O Linker Error
"_OBJC_CLASS_$_RCTRootView", referenced from:
"_OBJC_CLASS_$_RCTBundleURLProvider", referenced from:
"_RCTRegisterModule", referenced from:
Linker command failed with exit code 1
(use -v to see invocation)
I'm interpreting this error as the Share Extension is unable to find/link the associated libraries.
I've attempted to define the libraries in the Share Extension's:
General -> Frameworks and Libraries
Build Settings -> Search Paths -> Library Search Paths
The project here: https://github.com/Meandmybadself/react-native-share-starter
Versions
XCode: 11.3.1
Podfile iOS version: 11.0
react-native: 0.63.4
I don't know why I have this error("linker command failed with exit code 1 (use -v to see invocation)") on my IOS app.
This may happen because any of the following reasons.
if you do not import the framework properly.
if you are opening the .xcodeproj instead of .xcworkspace
Check the build settings -> Build Active Architectures only is set to No. (Then change it to YES)
Adding the other linker flags in Project and not in Targets. So, you move it to Targets, it shouldn't be in Project
I had a similar problem, and the problem was that mine Framework folder is not inside the project folder.
Build Settings > Framework Search Paths > enter these 2 lines in the window
$(PROJECT_DIR)/../<YOUR_FOLDER_WITH_FRAMEWORKS>
$(inherited)
I am using Qt to build UI Application,
The Qt application supposed to link to a static library (.a file)
The library is written by C++ and Objective C (*.mm) files.
I setup the Qt project file and linked the static library, but Qt Creator always gets linking error, and error is related with the function implement on *.mm which locates in the static library.
Question:
The Qt application how to link the library?
that's pure C++ application (Qt application) link to static library with C++ and ObjectiveC mixed (.a file).
update: link error
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_QTCaptureDevice", referenced from:
objc-class-ref in libmyapi.a(myTestFunction_mac.o)
"_QTMediaTypeVideo", referenced from:
myTestFunction() in myapi.a(myTestFunction_mac.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [myApp.app/Contents/MacOS/myApp] Error 1
14:38:06: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project myApp (kit: Desktop Qt 5.1.0 clang 64bit)
Qt5.1 with clang, support C++11
static library myapi.a, built by Xcode4.6 without error. Only one file is myTestFunction_mac, using QTKit framework.
myApp links myapi.a, but the myTestFunction_mac.mm implantation file has linking error.
You need to add QTKit framework to your app target.
Xcode 4
Click on the project in the browser pane to the left.
Click on the target under Targets.
Click on the Summary tab.
Expand Linked Frameworks and Libraries if not expanded.
Click on the + icon and type QTKit into the search box and add QTkit.
Xcode 3
Right click on the project.
Select Add-->Existing Frameworks.
Add QTkit.
I just upgraded xcode to 4.5 and now i get an error when compiling :
ld: library not found for -lxml2.2.7.3
cland: error: linker command failed with exit code 1
I did not change my code after the upgrade...
So?
thanks!
Click on your projekt ☞ target ☞ build phases ☞ link binary with libraries
then remove lxml2.2.7.3.dylib and add lxml2.dylib (if your project does not depend on a specific version of that library).
For my ionic project, I found that opening the .xcworkspace instead of .xcodeproj fixed this issue
I'm trying to archive an iPad application that used ParseKit. I'm able to run the app fine, utilizing ParseKit, for any build using the Debug Configuration (ie, Run on device / simulator ana analyze.) When I use the Release Configuration, however, I get the following linker error:
ld: library not found for -lparsekit
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1
I had the same error. The fix for me was to select:
ParseKit.xcodeproj (subproject within my project)
-> Target: ParseKitMobile
-> Build Settings
-> Product Name
...and change the name from 'parsekit' to 'libparsekit'. Curious that this is necessary for XCode4, but it's now working for me at least.
Check your flags in your release target: your debug and release builds will probably have different compiler flags set. In XCode4, go into your target's build settings and look for the "Other Linker Flags" section. You will hopefully find your release linker flags don't have a '-lparsekit' flag.