OpenD2 icon indicating copy to clipboard operation
OpenD2 copied to clipboard

Library issues in Linux (possibly Windows)

Open ghost opened this issue 5 years ago • 3 comments

[ 83%] Linking CXX executable game /usr/bin/ld: CMakeFiles/game.dir/Game/Renderer_SDL.cpp.o: undefined reference to symbol 'SDL_CreateTexture' /usr/bin/ld: /usr/lib/libSDL2-2.0.so.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/game.dir/build.make:489: game] Error 1 make[1]: *** [CMakeFiles/Makefile2:110: CMakeFiles/game.dir/all] Error 2 make: *** [Makefile:84: all] Error 2

This isn't the first time I've had this problem with other code bases, but, I've never seen a method to correct for this.

ghost avatar Jun 20 '19 15:06 ghost

Hi, make sure your system has SDL installed on it.


From: Inotamira [email protected] Sent: Thursday, June 20, 2019 11:32 AM To: eezstreet/OpenD2 Cc: Subscribed Subject: [eezstreet/OpenD2] Library issues in Linux (possibly Windows) (#26)

[ 83%] Linking CXX executable game /usr/bin/ld: CMakeFiles/game.dir/Game/Renderer_SDL.cpp.o: undefined reference to symbol 'SDL_CreateTexture' /usr/bin/ld: /usr/lib/libSDL2-2.0.so.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/game.dir/build.make:489: game] Error 1 make[1]: *** [CMakeFiles/Makefile2:110: CMakeFiles/game.dir/all] Error 2 make: *** [Makefile:84: all] Error 2

This isn't the first time I've had this problem with other code bases, but, I've never seen a method to correct for this.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/eezstreet/OpenD2/issues/26?email_source=notifications&email_token=AAN6MRO22HQ4L7NWDG4B6ODP3OPH7A5CNFSM4HZVEAFKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G2XUGDA, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAN6MRI7YAT7UXOBSDWDSCDP3OPH7ANCNFSM4HZVEAFA.

eezstreet avatar Jun 22 '19 20:06 eezstreet

I solved it by updating this line: https://github.com/eezstreet/OpenD2/blob/master/CMakeLists.txt#L68 to

	target_link_libraries(game ${SDL2_LIBRARIES} SDL2 SDL2_net SDL2_mixer m dl)

fengwang avatar Jul 02 '19 15:07 fengwang

Ran into the same issue, fixed doing the same.

gfriloux avatar Jul 08 '19 15:07 gfriloux