• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Compiling error with zlib during compilation

kite28

Member
Joined
May 15, 2012
Messages
69
Reaction score
5
Hello everyone, I would like to add more tiles to my server, I use tfs 1.4.2 this morning, I used this link and unfortunately it gives me an error. Can anyone help?

link thread :

error :

Lua:
/usr/bin/ld: /tmp/tfs.Ud77hR.ltrans5.ltrans.o: undefined reference to symbol 'deflate'
/usr/bin/ld: /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]: *** [CMakeFiles/tfs.dir/build.make:1529: tfs] Error 1
make[1]: *** [CMakeFiles/Makefile2:128: CMakeFiles/tfs.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
 
Install zlib
Code:
sudo apt-get install zlib1g-dev

In CMakeLists.txt in project root directory:

1. Add under the below another find_package line
Code:
find_package(ZLIB REQUIRED)

2. Between the include_directories parenthesis, add:
Code:
${ZLIB_INCLUDE_DIRS}

3. Between the target_link_libraries parenthesis, add:
Code:
${ZLIB_LIBRARIES}
 
Last edited:
Code:
sudo apt-get install zlib1g-dev
Add the -lz flag to your linker if you're using a Makefile or add zlib to the target_link_libraries in CMakeLists.txt
i use makefile. Could you elaborate more on your answer? where to paste these "target_link_libraries"
 
Back
Top