dynamic-library

clang, change dependent shared library install name at link time

倖福魔咒の 提交于 2020-01-19 05:18:30
问题 Related, but do not answer the question: How do I modify the install name of a .dylib at build time On OSX, I have a dynamic library provided by a packager manager, installed in a non standard directory, which install_name is just the filename. For example: $ ROOT=$PWD $ mkdir $ROOT/foo $ cd $ROOT/foo $ echo 'int foo(int a, int b){return a+b;}' > foo.c $ clang foo.c -dynamiclib -install_name libfoo.dylib -o libfoo.dylib I don't want to change (absolute path, @RPATH, ...) the install_name of

React Native Dynamically load modules/plugins?

穿精又带淫゛_ 提交于 2020-01-05 03:33:15
问题 As far as I've searched it appears to be impossible to load modules (=plugins/libraries?) dynamically (I'm very new to React Native..). What I'd like to accomplish is to let the user of the app load additional functions as she/he desires. Example: A user wants to add a music plugin to the app. Intuitively, I'd long for something like dynamic library loading. The user would fetch the library, it'll be loaded into the code and can then be executed. However, in React Native it seems like there

What's the meaning of dylib files?

最后都变了- 提交于 2020-01-03 09:04:25
问题 My C++ compiler creates "dylib" files which contain dynamic libraries. Whats the difference between .dylib and .so files? And what is the difference between files in Mach-O format and files in an ELF format? I have to build files for later use under iOS (static libraries only/Mach-O) and Android (ELF). Thanx! 回答1: I found that: One Mach-O feature that hits many people by surprise is the strict distinction between shared libraries and dynamically loadable modules. On ELF systems both are the

Building and Using a DYLIB in Xcode

余生长醉 提交于 2020-01-01 16:11:19
问题 I'm trying to build a .dylib in Xcode. Currently the .dylib builds, but when I drag the .dylib into another project and try to #import one of the headers (Seeker.h) in the .dylib, I get this error: *: No such file or directory Seeker.h: No such file or directory The project is available as an Xcode project here. I can confirm the header is indeed in a path alongside the .dylib once built, but as for what to do with it I have no idea. My only experience with .dylib files is frameworks built

Building and Using a DYLIB in Xcode

亡梦爱人 提交于 2020-01-01 16:10:02
问题 I'm trying to build a .dylib in Xcode. Currently the .dylib builds, but when I drag the .dylib into another project and try to #import one of the headers (Seeker.h) in the .dylib, I get this error: *: No such file or directory Seeker.h: No such file or directory The project is available as an Xcode project here. I can confirm the header is indeed in a path alongside the .dylib once built, but as for what to do with it I have no idea. My only experience with .dylib files is frameworks built

LD_LIBRARY_PATH failing while trying to run Qt app

[亡魂溺海] 提交于 2019-12-31 03:46:10
问题 I want to run a Qt 5 based application usind dynamic libraries on Linux. In summary, a script will copy the executable and other relevant files, including all required .so inside a lib folder, to the desired destination and a script calling gksudo will work as caller to the app. Till now everything works fine till I call the executable script: the app doesn't run. When I ask to run with sudo , it tells me that a library (Qt5SerialPort...) is missing. Running ldd over the actual executable I

dlopen on new binary with same name returns old handle

最后都变了- 提交于 2019-12-30 15:00:11
问题 I'm using dlopen to load dynamically generated code. The program calls the compiler on the code and generates a .so file which is then loaded by the program to extend itself. The problem is that if I use the same name for the generated code, the dlopen returns a handle to the old object, not the new one. The code looks like: …generate code into test.cpp system("gcc <args> test.cpp -o test.so"); void *handle = dlopen("test.so"); void *sym = dlsym(handle, "run"); (*sym)(); dlclose(handle); …Do

Is the function 'dlopen()' private API?

别说谁变了你拦得住时间么 提交于 2019-12-28 12:01:22
问题 I want use function 'dlopen()' to invoke a dynamic library on iOS platform, is the function 'dlopen()' private API? 回答1: I've had success using dlopen on iOS for years. In my use case, I use dlopen to load public system frameworks on demand instead of having them loaded on app launch. Works great! [EDIT] - as of iOS 8, extensions and shared frameworks are prohibited from using dlopen , however the application itself can still use dlopen (and is now documented as being supported for not only

Is the function 'dlopen()' private API?

 ̄綄美尐妖づ 提交于 2019-12-28 12:01:03
问题 I want use function 'dlopen()' to invoke a dynamic library on iOS platform, is the function 'dlopen()' private API? 回答1: I've had success using dlopen on iOS for years. In my use case, I use dlopen to load public system frameworks on demand instead of having them loaded on app launch. Works great! [EDIT] - as of iOS 8, extensions and shared frameworks are prohibited from using dlopen , however the application itself can still use dlopen (and is now documented as being supported for not only

Failure when trying to run application release version on another machine with the “code signature invalid” error

喜你入骨 提交于 2019-12-25 09:16:32
问题 Compiled release version of my app and copied the bundle over to another machine for testing. Crashes with this: Dyld Error Message: Library not loaded: @rpath/libxxx.dylib Referenced from: /Users/USER/Downloads/*/ndncon.app/Contents/MacOS/ndncon Reason: no suitable image found. Did find: /Users/remap/Downloads/ndncon2-testing/ndncon.app/Contents/MacOS/../Frameworks/libxxx.dylib: code signature invalid for '/Users/remap/Downloads/ndncon2-testing/ndncon.app/Contents/MacOS/../Frameworks/libxxx