ld: file not found: /usr/lib/libextension.dylib - dylib

ld: file not found: /usr/lib/libextension.dylib
Can some one help me to find this file. I can`t work without it. Its is used to make a .ipa when deploying marmalade project.

This file is relative to the application path from where your iOS SDK is installed. For instance, the full path might look like this:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/lib/libextension.dylib
If it cannot be found, a new installation of the iPhoneOS SDK could have relocated it. Some of the newer Xcode updates will remove older iPhoneOS SDKs as well which might still be referenced.
Try searching for lib extension.dylib from /Applications/Xcode.app/Contents/Developer/Platforms/iPhonseOS.platform/Developer/SDKs/

Related

Undefined symbols for architecture x86_64 for mac

I used podofo library for mac application development, while building demo app i am getting following errors.
The error messages seem to indicate that you are working with static libraries (.a libraires). So, when building your demo app, you need to link with all the librairies needed, including the ones needed by freetype and fontconfig. These are bz2, z, crypto (from the openssl distribution) and others...
If Podofo is built with cmake, you can look at the CMakeCache.txt file. It contains the path where each library Podofo depends on was found on your system.
The bz2 library is not listed in the CMakeCache.txt. It is there by default, so you may just add
-lbz2
to the "Other Linker Flags" in your Xcode project build settings.

.app file not working in other MAC system

I have created a MAC application with libraries 'libmysqlclient.a' and 'libmysqlclient.18.dylib' with Objective-C language in Xcode 6.3.1 in OSX Yosemite 10.10.3. Its working fine when running through Xcode. And I also archived the .app file to install the app in my MAC, its also working fine. But when i tried to install it in another mac, app crashed and shows the message
"dyld: Library not loaded: libmysqlclient.18.dylib Referenced from: /Users/developer/Documents/UntitledFolder/UserName/SampleApp.app/Contents/MacOS/SampleApp Reason: image not found".
From this message i understand that the particular MAC does not have “libmysqlclient.18.dylib”. So, here my question is "Is it mandatory that each MAC should have the library to install and run the application?". Can anyone give me the solution for this with detailed format of creating the .app file and installing it in other MAC systems.
Thanks in Advance.
You have included both a static (.a) and a dynamic (.dylib) library with your app. that do the same thing. A static library compiles into your program, making it larger. A dynamic library ships with your app. or is already install on your target system. If you ship it with your app., it should be in the Frameworks folder of your app. (you create this folder in Build Phases, Copy File). Use install_name_tool -id to set the library install name to #executable_path\..\Frameworks and also in Build Settings, set Runpath Search Paths to the same.

Linker error for imported header file Xcode 4.5

I have downloaded a header file and static library file (.a file) from the internet. They are provided by the wireless printer which i bought for my iphone and trying to make print functionality working in my app. The problem is when I run the sample app provided by them to test printer, I get the following linker error...Obviously the app was designed in the previous versions of Xcode and Im using Xcode 4.5. Much appreciated if someone could Guide me..
If you are building an iOS project and it's using the i386 architecture, then you must be building for the simulator. What happens when you build for an actual iOS device?
It's possible that the library was compiled only for the processor architectures for real iOS devices, typically armv6, armv7, or armv7s. You can use the file command in Terminal to see what architectures are in the .a library file.
Check these answers Symbols not found for architecture i386? and symbols not found.
Check your project-> build phases -> Link Binary With Libraries whether there is libwspr240.a file is there or not.
Remove libwspr240.a file and then readd it using
Project --> Build Phases --> Link Binary with Libraries click '+' button to add.
Then Clean and Build the project

Zbar SDK is not working in iOS6

I was using ZBar for scanning in iOS5 and it was working well.
Now after updating to iOS6, its not working. It shows a following error.
ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /Users/mac4/Desktop/my desktop/My app/MyApp name 20:09:12 /MyApp name/ZBarSDK/libzbar.a for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What is wrong in my side?
In Xcode, go to the settings of your target,
change 'Valid Architectures'
from
armv7,armv7s
to
armv7
This change means your app will not take advantage of possible optimizations the new iPhone5 processor has, but you don't have to wait for 3rd party libraries to upgrade or mess with a hex editor.
i recently faced the same issue. The problem seems to be that the ZBar SDK is not ready for the armv7s architecture.
I solved the problem this way:
Go to the ZBar homepage and navigate to the mercurial repository (direct link)
Download the zbar repository as zip.
Unzip the file and navigate to the subfolder named "iphone".
Open the XCode project.
Delete the "Examples" folder (the folder caused a build error on my machine).
Hit "CMD + B" and build the source.
Find your new libzbar.a file. (User/Library/Developer/Xcode/DerivedData/zbar...)
Replace the old libzbar.a file in your project with the new one.
Hit "CMD + R" and you are good to go.
The hg sources download/re-compilation tutorial is great, but you don't need to do all that.
Just browse to http://sourceforge.net/projects/zbar/files/iPhoneSDK/beta/ and download ZBarSDK-1.3.1.dmg, and everything will work out of the box for the latest architectures (in my case armv7, armv7s).
Update:
Some of you reported issues with ZBarSDK on XCode 5, iOS 7 or architectures arm64... well I went back to this project today and experienced similar issues and found that there is a ZBarSDK library that is compiled to work with iOS 7 at: http://www.nerdvision.net/app-development/ios/zbar-sdk. I Just replaced the old files with the new ones and my project compiled. Note that the Architectures in my project's Build Settings are set to amrv7, arm64 ($ARCHS_STANDARD), Base SDK is set to iOS 8.0 and I have the Build Active Architectures Only flag set to Yes.
There is a question here at SO about this: zbar SDK dont work for armv7s(iPad 4 iOS 7)
Thanks to #cdescours for the tip!
I have same problem but I just added armv6 and armv7 then it works for iOS6. Just insert armv6.
your binary library does not have code for armv7s. So you should recompile it for the current archtitectures.
Recompile the source, I download the source code for zbar and compile into new project. It's simple.
Clone the Mercurial repository and build with Xcode. It's very easy. Here's a link to the repository:
http://zbar.hg.sourceforge.net/hgweb/zbar/iphone/summary
Came here with the same problem after downloading the tutorial code RDC provided in his blog. Very useful post, but the most helpful answer here was posted by RacZo on 3/29. I just downloaded the original ZBarSDK-1.3.1.dmg image, removed the ZBarSDK from my project and replaced with the original. Done.
I am learning IOS development. After few days digging,
Here is the tutorial for installing ZBar SDK.
1, The accepted answer is correct, but with some limitations. (tried, works!)
2, The alternative solution is here. (tried, works!)
3, The best is to build the all different architectures separated then bind them using lipo: Great Solution (tried, brilliant!)
Some readings for understanding those architectures:
http://wanderingcoder.net/2010/07/19/ought-arm/
http://wanderingcoder.net/2011/09/25/compiling-armv7/

FreeImage library not found

Installed FreeImage through MacPorts. Everything looked to be OK, but when I builded my app and tried to launch on other computer where is no MacPorts and no FreeImage installed it says
dyld: Library not loaded: /opt/local/lib/libfreeimage.3.dylib
Referenced from: /Users/development/Library/Developer/Xcode/DerivedData/freeimage-dxsornyaxqlkyubqwsrlkgszvxhy/Build/Products/Debug/freeimage.app/Contents/MacOS/freeimage
Reason: image not found
Shouldn't it copy library files together with my project? I added them to my project's build phases "Copy files" list. They are being copied to my app's bundle. But when I try to link them, I get same error. I don't know why but app is still looking for library in /opt/local/lib. How can I fix it so that I could use FreeImage at my project and run it at any computer?
When you install through MacPorts the library is installed in /opt/local/lib, not in your project path. Even if you copy the whole project, the *dylib libraries won't be copied because they are usually in /opt/local/lib.
I believe you have two options here: install FreeImage in every computer that you want to run your application, or copy the libfreeimage.3.dylib to the same folder where your binnary is and, if both systems are similar, that should work. If the two computers are different in terms of operating system version, hardware architecture, etc... then probably the .dylib that you have won't be compatible for the other computer.
Another thing you might want to consider is to modify your DYLD_LIBRARY_PATH variable, which specifies the paths in which the OS will look for libraries when linking. See this answer for more information.