dylib

How to unmangle exported symbols from C++ in dynamic libraries in XCode on OSX

℡╲_俬逩灬. 提交于 2019-12-10 16:23:30
问题 I've been trying to develop a dynamic library in C++ that can be run-time loaded in an application. I finally got it working, but it's a little ugly. I have a function that takes a pointer to a C++ class as an argument, which looks like this: bool registerGrindPlugin( Grind::PluginManager* mgr ); But of course it's being exported as: _Z19registerGrindPluginPN5Grind13PluginManagerE I tried a .c file with a simple function and it exported fine as "registerGrindPlugin", but of course I can't

Using Dylibs Inside App Bundle

你。 提交于 2019-12-10 14:04:31
问题 I am trying to compile an app that uses multiple libraries using Xcode. To do so, I created a script that copies all of my .dylibs from a location on my computer to the Frameworks folder inside my app bundle. After adding the necessary linker flags and header search paths , I must now add my library search paths . Since I have copied all the libraries inside my Frameworks folder of my app bundle, I have deduced that I must add $(FRAMEWORKS_FOLDER_PATH) to the library search paths setting.

Dependencies on boost library don't have full path

拟墨画扇 提交于 2019-12-10 12:37:05
问题 I have my dynamic library built successfully with dependencies on boost libraries which were built and installed with custom prefix ( ./b2 install --prefix=PREFIX ). However, when I run otool -L on my library I get output like this: ... libboost_regex.dylib (compatibility version 0.0.0, current version 0.0.0) libboost_system.dylib (compatibility version 0.0.0, current version 0.0.0) ... Which is, unlike other dependencies, presented without full path towards these boost libraries. This

Linker setting for distributed dylib

别说谁变了你拦得住时间么 提交于 2019-12-10 10:59:15
问题 I'm struggling with the right options in XCode to include a dylib in my app. I do have a dylib in /usr/local/lib which I do need for my app. As long as I set this path in Lib Search Paths everything works fine. But of course I want to distribute the dylib with my app which is why I added it to a copy phase: This indeed copies the dylib into the Frameworks folder in the app. But running on the target system, the app does not find the dylib. It even does not find it in /usr/local/lib . Rather

.dll Equivalent on Mac OS X [duplicate]

假装没事ソ 提交于 2019-12-10 10:16:54
问题 This question already has answers here : How do third-party libraries work in Objective-C and Xcode? (4 answers) Closed 5 years ago . I am from a Windows background and I am used to creating SDKs by creating ( .dll )s and then distributing all the libraries and Documentation. So, if a user wants to use it, he adds a reference to the library and uses it. However, in a Mac, I am working on a SDK and I want a way of creating and distributing Mac libraries. (I want to create the library in

Does Apple allow Qt on iOS as dynamic library? [closed]

China☆狼群 提交于 2019-12-08 15:40:38
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . With the technology preview of Android/iOS support in Qt 5.1, are there any news on deploying to Apple's app store yet? Since the non-commercial version of Qt is LGPL-licensed, and dylibs are usually not permitted by the app store rules, there would not to be an exception either on Digia's or Apple's side,

Mac Dynamic Library Craziness (May be Fortran Only)

冷暖自知 提交于 2019-12-08 10:50:37
问题 I have this fortran 90 file (will add the code to the bottom of the question) which I have compiled into a dynamic library on OS X Mavericks using the following command: gfortran -dynamiclib trianglepy.f90 -o libtriangle.dylib . This produces libtriangle.dylib which is stored on my desktop. I can than make a C++ file using this library(code attached at bottom). I than compile the code using g++ main.cpp -o main -std=c++11 -L ~/Desktop/ -ltriangle . This compiles the code perfectly. But when I

macports, cmake/make and 'dyld: Library not loaded'

不打扰是莪最后的温柔 提交于 2019-12-08 10:45:00
问题 I recently upgraded a library I use in a project of mine (glfw-devel) with macports and now my executable is dynamically link with lib/libglfw.3.dylib instead of opt/local/lib/libglfw.3.dylib which is the actual location of the lib so I get a dyld: Library not loaded error. I know how to fix this with install-names or with a simple copy. What I cannot understand, however, is why this happens suddenly after a simple upgrade. I haven't changed anything in my CMakeLists.txt (the most relevant

Add load command to mach-o binary

前提是你 提交于 2019-12-07 23:08:47
问题 Is it possible to add an LC_LOAD_DYLIB to a binary? There has been protection against DYLD_INSERT_LIBRARIES being used so I need another to load a dylib into an app 回答1: I open-sourced optool which does exactly this. 来源: https://stackoverflow.com/questions/8862602/add-load-command-to-mach-o-binary

Qt application throws “dyld: Symbol not found: __cg_jpeg_resync_to_restart”

孤街浪徒 提交于 2019-12-07 05:25:46
问题 I get well known dyld issue on OS X. Qt.pro file: INCLUDEPATH += /usr/local/Cellar/libpng/1.6.23/include /usr/local/Cellar/jpeg/8d/include LIBS += -L/usr/local/Cellar/libpng/1.6.23/lib -L/usr/local/Cellar/jpeg/8d/lib -ljpeg -lpng -ljpeg -lz In runtime my application throws: dyld: Symbol not found: __cg_jpeg_resync_to_restart Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib Expected in: /usr/local/Cellar/jpeg/8d/lib/libjpeg.8.dylib in /System