1 year ago

#17296

test-img

Gary Fisher

How do you include/link libraries to an executable file Eclipse c++

I am trying to distribute an executable file from a c++ project I made in eclipse. The problem is, it uses the SDL2 and SDL2 Image libraries which works fine on my computer since they are downloaded already, but when I try to run it on another computer I get an error message saying:

dyld[16619]: Library not loaded: /opt/local/lib/libSDL2-2.0.0.dylib
  Referenced from: /Users/garrettmurray/Downloads/Morph Bunny-2/Morph Bunny
  Reason: tried: '/opt/local/lib/libSDL2-2.0.0.dylib' (no such file), '/usr/local/lib/libSDL2-2.0.0.dylib' (no such file), '/usr/lib/libSDL2-2.0.0.dylib' (no such file)
zsh: abort      /Users/garrettmurray/Downloads/Morph\ Bunny-2/Morph\ Bunny

Is there any way to include them into the executable, or do they need to be downloaded as well and if so how do you link them to the executable?

c++

eclipse-cdt

sdl-2

sdl-image

0 Answers

Your Answer

Accepted video resources