dylib

Attaching sources to a binary dylib in Xcode

假如想象 提交于 2019-11-29 06:03:25
问题 I've a framework with a dylib in my iOS app which was compiled on another machine. I checked out the sources on my machine and tried instructing lldb to map the source code path using: settings set target.source-map /source/code/path/in/dylib/prefix /source/code/path/on/my/machine/prefix To no avail, still seeing assembly. Note #1: the dylib was compiled from C++ code in the same version of Xcode. Note #2: I'm used nm -pa /path/to/dylib to determine whether file paths are embedded into the

creating a .dll on a mac: .dylib or framework?

时光毁灭记忆、已成空白 提交于 2019-11-29 02:53:22
问题 I need to create a Mac version of our libraries for one of our customers. I am not so familiar with dynamic libraries on Mac, but from what I understand, I have 2 options: .dylib or frameworks. What would be the best option? Why? Few related questions: If I understand correctly, .dylib have to be installed in one of the stnadard UNIX directories such as /usr/lib, etc. Hence using a .dylib should make my customer's installer much more complex, since they'll probably need to request permission

How to properly set run paths, search paths, and install names?

邮差的信 提交于 2019-11-28 22:59:57
问题 I have a collection of projects that I'm compiling as dynamic libraries. Each of these .dylibs depend on other various .dylibs that I would like to place in various other directories (i.e. some at the executable path, some at the loader path, some at a fixed path). When I run otool -L on the compiled libraries, I get a list of paths to those dependencies but I have know idea how those paths are being set/determined. They almost appear pseudo random. I've spent hours messing with the "Build

Linking to a dynamic library on a Mac with full path

五迷三道 提交于 2019-11-28 19:24:01
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 /Applications/MATLAB_R2009b.app/bin/maci64/libeng.dylib /Applications/MATLAB_R2009b.app/bin/maci64/libmx.dylib -framework Python resulting in $ otool -L library.so library.so: @loader_path/libeng.dylib (compatibility version 0.0.0, current version 0.0.0) @loader_path/libmx.dylib (compatibility version 0.0.0, current version 0.0.0) /System/Library/Frameworks/Python.framework/Versions

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

给你一囗甜甜゛ 提交于 2019-11-28 18:46:44
问题 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. 回答1: Use g++ -dynamiclib -undefined suppress -flat_namespace *.o -o something.dylib 来源: https://stackoverflow.com/questions/3532589/how-to-build-a-dylib-from-several-o-in-mac-os-x-using-gcc

Will Appstore reviewers allow us to use dynamic library in iOS8?

99封情书 提交于 2019-11-28 18:26:39
I read many articles about dynamic library usage including this page " Can you build dynamic library... ". As apple document said, " Frameworks for iOS. iOS developers can now create dynamic frameworks. Frameworks are a collection of code and resources to encapsulate functionality that is valuable across multiple projects. Frameworks work perfectly with extensions, sharing logic that can be used by both the main application and the bundled extensions. ", see full page from here . Taking the security issue as consideration, I got the reject reason of dynamic library before iOS8 , see details

XCode dylib looking in /usr/lib

廉价感情. 提交于 2019-11-28 14:19:11
I created a dylib in XCode. I set the installtion directory to @rpath. Then I created a test project in which I am using this dylib. When I run it, I get dyld error:library not loaded....Reason: no image found. BUT....if I put that dylib in/usr/lib folder, then it works like a charm. So my question is, is there a way when compiling this dylib, I can specify some settings so it doesn't look in /usr/lib and simply looks where it's located (if that makes any sense)? Thanks! Edit: I re-read your question after writing this answer. Since you're only creating the dylib, not an executable, you should

dyld: Library not loaded. Reason : no suitable image found

拜拜、爱过 提交于 2019-11-28 09:14:02
I've looked at a bunch of answers here and none have fixed my issue. I have an Xcode workspace with a custom framework and an iOS app project. The project has been working fine until this morning, now it builds but immediately crashes: dyld: Library not loaded: @rpath/ONCKit.framework/ONCKit Referenced from: /private/var/mobile/Containers/Bundle/Application/4DF67A3F-6255-4276-8812-8C742A363995/atero_t.app/atero_t Reason: no suitable image found. Did find: /private/var/mobile/Containers/Bundle/Application/4DF67A3F-6255-4276-8812-8C742A363995/atero_t.app/Frameworks/ONCKit.framework/ONCKit: mmap(

XCode 4 adding dylib

青春壹個敷衍的年華 提交于 2019-11-28 09:04:56
I am trying to create and then add the dylib to a project. I created it by using the "Cocoa-Library" template and setting the type to "Dynamic" (not sure if it should be dynamic or static...). Then I created a simple obj-c class called Test and wrote a method in it that prints out something to console. I compiled and used the generated .dylib file and put it in another project. Now whenever I try to use it, I get this message on runtime" dyld: Library not loaded: /usr/local/lib/TESTLib.dylib Referenced from: /Users/***/Library/Developer/Xcode/DerivedData/TestingDYLIB

how to make python load dylib on osx

我与影子孤独终老i 提交于 2019-11-28 04:01:11
问题 Trying to load a shared lib out of the current '.' dir in a unit test on osx. What works on Linux and Netbsd there is a symlink _mymodule.so --> ../.libs/libmymodule.so but on osx, python's import mymodule won't find _mymodule.dylib --> ../.libs/libmymodule.dylib I've tried adding export DYLD_LIBRARY_PATH=.:$DYLD_LIBRARY_PATH to the script env, nogo. Any help appreciated. -Ed update 4/6/10: Solved with the info from krunk below. But just copying or ln -s'ing the dylib to a .so name didn't