Questions tagged [dylib]

Xcode Dynamic Library file extension

803 questions
403
votes
40 answers

dyld: Library not loaded ... Reason: Image not found

When trying to run an executable I've been sent in Mac OS X, I get the following error dyld: Library not loaded: libboost_atomic.dylib Referenced from: /Users/"Directory my executable is in" Reason: image not found Trace/BPT trap:5 I have…
rwolst
  • 12,904
  • 16
  • 54
  • 75
295
votes
4 answers

What are the differences between .so and .dylib on macOS?

.dylib is the dynamic library extension on macOS, but it's never been clear to me when I can't / shouldn't use a traditional unix .so shared object. Some of the questions I have: At a conceptual level, what are the main differences between .so and…
Trent Davies
  • 3,309
  • 3
  • 17
  • 7
146
votes
4 answers

Why Xcode 7 shows *.tbd instead of *.dylib?

Xcode 7 In Target > BuildPhases > Link Binary With Libraries > tap + button When choosing frameworks to add, you cannot find *.dylib, you'll see *.tbd instead. What is the reason for this? **For people who need dylib, follow from this post Choose…
Ted
  • 22,696
  • 11
  • 95
  • 109
143
votes
4 answers

How to print a list of symbols exported from a dynamic library

So I've been trying to get dynamic libraries to work in my XCode project under Mac OS X. So far no joy. I am able to load the dylib file, but when I call dlsym to get the function pointer, it returns 0 and dlerror says symbol not found. So I am…
Gerald
  • 23,011
  • 10
  • 73
  • 102
122
votes
3 answers

Can you build dynamic libraries for iOS and load them at runtime?

Are dynamic libraries supported on iOS (iPhone/iPad)? In Xcode, I tried to create a New project -> Framework & Library -> Cocoa Library (dynamic). In the project settings, I set the Base SDK to iOS device 4.1 and target to iOS4.1, but it has a…
user510951
  • 1,295
  • 3
  • 10
  • 10
69
votes
15 answers

Xcode 6 and Embedded Frameworks only supported in iOS8

When using an embedded framework (dyld) in Xcode 6.0.1 with deployment target less that iOS 8 I get: Build is successful Runtime library loading error Error: dyld: Library not loaded: @rpath/ObjectiveLyricsTouch2.framework/ObjectiveLyricsTouch2 …
loretoparisi
  • 15,724
  • 11
  • 102
  • 146
54
votes
1 answer

install_name_tool to update a executable to search for dylib in Mac OS X

I have a dynamic libray libtest.dylib that is installed in /PATH/lib, and an execution binary, myapp, that uses the dylib installed in /PATH/bin. I can run myapp to find the dylib as follows (Is it OK to use DYLD_LIBRARY_PATH on Mac OS X? And,…
prosseek
  • 182,215
  • 215
  • 566
  • 871
42
votes
14 answers

Brew doctor: dyld: Library not loaded & Error: No available formula for zlib

When I brew doctor I get the following errors: dyld: Library not loaded: /usr/lib/libltdl.7.dylib Referenced from: /usr/local/bin/php Reason: image not found Error: No available formula for zlib The file libltdl.7.dylib is not in my /usr/lib…
Ryan
  • 6,027
  • 16
  • 52
  • 89
37
votes
4 answers

How to use dylib in Mac OS X (C++)

I made an application (an executable) calling some dylib successfully. However, the dylib files and the executable are in different directory. I added the directory contains dylib files to the $PATH environment variable. However, it still doesn't…
Alfred Zhong
  • 371
  • 1
  • 3
  • 3
35
votes
1 answer

How to build a dylib from several .o in Mac OS X using gcc

I have several .o files and want to bundle them in a .dylib, how can I do that it Mac OS X using gcc? Thank you very much.
Tianyi Cui
  • 3,933
  • 3
  • 21
  • 18
30
votes
4 answers

How do I create a dynamic library (dylib) with Xcode?

I'm building few command-line utilities in Xcode (plain C, no Cocoa). I want all of them to use my customized version of libpng, and I want to save space by sharing one copy of the library among all executables (I don't mind re-distributing .dylib…
Kornel
  • 97,764
  • 37
  • 219
  • 309
26
votes
1 answer

ld: library not found for -lz.1.2.3

When trying to compile the software for iOS 5, XCode 4.2 throws an error: ld: library not found for -lz.1.2.3 I found this post that tells me to replace 1.2.3. with 1.2.5 https://github.com/dbloete/ioctocat/issues/107 After doing what the link has…
Zhen
  • 12,361
  • 38
  • 122
  • 199
26
votes
4 answers

Apple Mach-O linker (id) warning : building for MacOSX, but linking against dylib built for iOS

Starting from some point in the past xCode 4 in complaining about linker problems: ld: warning: building for MacOSX, but linking against dylib built for iOS: …
Igor
  • 261
  • 3
  • 4
23
votes
2 answers

What is the deal with undefined symbols in a shared library or dylib?

I have a Makefile for linux that I am porting over to Darwin. The makefile takes a bunch of .o files and links them together into a .so shared object. Okay, so I figured (am I wrong about this?) that the best analog for this in Darwin is the…
eeeeaaii
  • 3,372
  • 5
  • 30
  • 36
23
votes
4 answers

Linking to a dynamic library on a Mac with full path

I am linking a (Python extension) library that embeds the Matlab engine with the following command (generated using cmake) c++ -mmacosx-version-min=10.6 -bundle -headerpad_max_install_names -o library.so library.o…
D R
  • 21,936
  • 38
  • 112
  • 149
1
2 3
53 54