OpenTechEngine / OpenTechBFG

Engine based on (RB) Doom 3 BFG aiming to allow the creation of standalone games
Other
85 stars 11 forks source link

Can't build against zlib 1.2.8 #7

Closed darealshinji closed 9 years ago

darealshinji commented 10 years ago

Linking dynamically against the system's zlib version instead of the bundled one fails:

/usr/bin/ld: CMakeFiles/RBDoom3BFG.dir/framework/File_SaveGame.cpp.o: undefined reference to symbol 'inflateInit2_'
//lib/x86_64-linux-gnu/libz.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [RBDoom3BFG] Error 1
make[1]: *** [CMakeFiles/RBDoom3BFG.dir/all] Error 2
make: *** [all] Error 2

OS: Linux Mint Kernel: x86_64 Linux 3.13.0-34-generic

PS: I have the same problem with libglew.

kortemik commented 10 years ago

http://stackoverflow.com/questions/24096807/dso-missing-from-command-line meaning it's -lz for gcc but specifying add_library(z) for cmake would use -llibz which does not exist

that's why the jpeg is set like set(JPEG_LIBRARY jpeg) and added to linking targets of the binary instead of using add_library()

I suspect this is the problem here

kortemik commented 9 years ago

currently we bundle zlib, please open this issue again if still valid