It’s actually quite simple on Linux and other ELF systems: http://www.linuxjournal.com/content/embedding-file-executable-aka-hello-world-version-5967
OS X has bundles, so you just build your library as a framework and put the file in the bundle.
More Related Contents:
- Change stack size for a C++ application in Linux during compilation with GNU compiler
- What is the -fPIE option for position-independent executables in gcc and ld?
- The advantages of using 32bit registers/instructions in x86-64
- Telling gcc directly to link a library statically
- LD_LIBRARY_PATH vs LIBRARY_PATH
- How to suppress GCC warnings from library headers?
- How do I force make/GCC to show me the commands?
- Vectorizing with unaligned buffers: using VMASKMOVPS: generating a mask from a misalignment count? Or not using that insn at all
- GNU gcc/ld – wrapping a call to symbol with caller and callee defined in the same object file
- Calling printf in extended inline ASM
- How to specify new GCC path for CMake
- How do I check if gcc is performing tail-recursion optimization?
- How Does The Debugging Option -g Change the Binary Executable?
- How to cross compile from Mac OS X to Linux x86?
- how to install gcc on windows 7 machine?
- How to make gcc warn about passing wrong enum to a function
- How to detect SSE/SSE2/AVX/AVX2/AVX-512/AVX-128-FMA/KCVI availability at compile-time?
- -isystem on a system include directory causes errors
- Does a compiler always produce an assembly code?
- Why does the x86-64 System V calling convention pass args in registers instead of just the stack?
- What is the difference between “gcc -s” and a “strip” command?
- Linux process stack overrun by local variables (stack guarding)
- Understanding GCC’s floating point constants in assembly listing output
- Why gcc 4.1 + gcov reports 100% branch coverage and newer (4.4, 4.6, 4.8) reports 50% for “p = new class;” line?
- How does the GCC implementation of modulo (%) work, and why does it not use the div instruction?
- How to use AVX/pclmulqdq on Mac OS X
- Fast Division on GCC/ARM
- define a program section in C code (GCC)
- x86_64: Is it possible to “in-line substitute” PLT/GOT references?
- Is the hash required for immediate values in ARM assembly?