osx - Making SDL2 app portable on OS X -


some background: consider understanding of c++ quite strong, total beginner graphics, sdl2, , static linking, i'm not sure if understanding of problem i'm having quite accurate. goal learn opengl (i'm following tutorial @ https://open.gl.com) , sdl , i'd make simple application portable on recent versions of os x utilizes sdl2 + opengl.

i first installed sdl2 on mac os x sierra downloading .dmg this link, mac os x. in dmg installer ui placed library /library/frameworks/ directed. compile program following:

g++ test.cpp -i/library/frameworks/sdl2.framework/headers -framework sdl2

...however gross errors when trying run resulting binary on mac without sdl2 installed in way. makes sense. read needed statically link sdl2 library resulting binary make application more portable, i.e., working on os x without user having install extra. seemed i’d need perform static linking @ compile time happen , every example found used sdl2-config in form or in invocation of g++. decided build sdl2 source using first few lines of these instructions say, in short:

  • ./configure
  • make
  • sudo make install

now access sdl2-config (located in /usr/local/bin/sdl2-config) ran g++ test.cpp $(std2-config --static-libs --cflags) assuming statically link necessary sdl2 files i'd need binary allowing more fluid transport. again did not work, , resulting error on os x (without sdl2 installed) when trying run binary is:

dyld library not loaded /usr/local/lib/libsdl2-2.0.0.dylib.

i'm assuming i'm trying possible , don't know enough compiling understand exact error if provide guidance this, incredible. thanks!


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -