Questions tagged [dylib]

Xcode Dynamic Library file extension

803 questions
13
votes
2 answers

Swift: How to call a C function loaded from a dylib

Is there a way to call a C function loaded from a dylib from Swift? This is my dylib file: cppdemofile.cpp #include "cppdemofile.h" int add(int a, int b) { return a + b; } cppdemofile.h #ifndef __CppDemoLibrary__cppdemofile__ #define…
Andres
  • 1,090
  • 14
  • 30
13
votes
2 answers

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

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…
Itachi
  • 5,777
  • 2
  • 37
  • 69
13
votes
1 answer

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

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…
vectorizor
  • 689
  • 2
  • 9
  • 13
12
votes
1 answer

dylib @executable_path path issue in a plug-in bundle

I am developing a plug-in bundle, say MyPlugIn.bundle for an application, say BigApp.app. This bundle requires a dylib, say MyPlugIn.bundle/Contents/Resources/library.dylib. I have relocated paths for library.dylib, as I would have done for a simple…
moala
  • 5,094
  • 9
  • 45
  • 66
11
votes
1 answer

Creating a dylib file on MacOS for use with Python wrapper of Steamworks API

I am a hobbyist programmer trying to integrate the SteamworksForPython API into a Python-based game. This API is a Python wrapper of the Steamworks API, which only officially supports C++. I am working on MacOS Sierra 10.12.6. Blindly following the…
DyingIsFun
  • 1,227
  • 2
  • 10
  • 21
11
votes
1 answer

Is there a downside to running `strip -S -x` on all frameworks in my macOS binary? If not, how can I automate that process?

I noticed that running strip -S -x (remove all debug and all local symbols) on the binaries in my app's 'Frameworks' folder makes them ~25% smaller, even when I have enabled stripping of debug symbols in my build settings. Also note that this makes…
MrMage
  • 7,282
  • 2
  • 41
  • 71
11
votes
3 answers

How to compile source that uses dylib path on macOS Sierra from the shell

I'm compiling some source code that requires some dylibs from other project that I have already built. I'm getting ld: symbol(s) not found for architecture x86_64` Whenever I execute g++ some_code.cpp -I/usr/local/include -o executable_binary I…
JPCF
  • 2,232
  • 5
  • 28
  • 50
11
votes
1 answer

I would like to use a UNIX command-line program (Berkeleys SPICE) in an iOS app. What is the process to compile it into a usable library?

I am trying to use Berkeley's SPICE tool in an iOS app, but am having trouble compiling it for iOS. It is a command-line program that I can call from a terminal like: ./spice3f5 Which works well, and I would like this functionality in…
A_toaster
  • 1,196
  • 3
  • 22
  • 50
11
votes
1 answer

Dependencies on boost library don't have full path

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…
peetonn
  • 2,942
  • 4
  • 32
  • 49
11
votes
3 answers

Does Apple allow Qt on iOS as dynamic library?

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…
AndiDog
  • 68,631
  • 21
  • 159
  • 205
11
votes
1 answer

In Xcode, how do I link a dynamic library (libcurl) so that the app also works on older versions of the Mac OS?

I am using libcurl in a Mac project built and compiled on OS 10.7 Lion. I can link to the dynamic library just fine, using either the -lcurl option in Other Linker Flags or by adding the library to my project. Everything works as its supposed…
Philip
  • 655
  • 8
  • 12
10
votes
1 answer

unload dynamic library needs two dlclose() calls?

I have a dynamic library which I load using dlopen() and then unload using dlclose(); If I dont include any objective c code dlopen() needs one dlclose() call which is expected behavior. But when I include any objective c code to target, I have…
RLT
  • 4,219
  • 4
  • 37
  • 91
10
votes
1 answer

dylib cannot load libstd when compiled in a workspace

I have a project with the following structure: Cargo.toml my_script.py my_lib: - Cargo.toml - src my_bin: - Cargo.toml - src Where: my_lib is a Rust library with crate-type = ["dylib"] my_bin is a Rust binary application using…
Maeln
  • 370
  • 1
  • 21
10
votes
2 answers

How to insert a LC_LOAD_DYLIB command into a Mach-O binary (OSX)

I'm looking to patch a piece of abandonware with some code. The software is carbon based, so I can not use an InputManager (at least, I do not think I can). My idea was to add a dylib reference to the mach-o header, and launch a new thread when the…
Moe
10
votes
2 answers

Finding dylib version using dlopen

Is there a way to find the version of a dylib using its path? I am looking for something that accepts the same arguments as dlopen. I have looked at NSVersionOfRunTimeLibrary, but from my reading of the documentation it looks like it gets the…
adk
  • 4,479
  • 9
  • 36
  • 38
1 2
3
53 54