Trouble compiling a server from source: ZLIB error
So I am trying to compile a server from the source. At first I ran into a C_compiler missing issue but I followed advice online that said to start a project inside VS 2015 and it would download the missing components. This worked, now when I run cmake with the server as the source it started configuring but then crashed with an error saying ZLIB couldn't be found. Does anyone know how I get this missing piece? Thanks.
Update: found Zlib compiled dll on the zlib website so trying to install that by reading the usage.txt zlib. |
Mixing code like that is the best way to fall into an error trap.
The safest thing is to build a 'local' copy of the zlib library using your system files and settings. If you did get copies of the proper header files and a matching dll that works, congrats! But, if you start getting zlib-based errors or crashes surrounding zlib calls, I would revisit this. |
Thanks for the heads up. So could you tell me where I should put the header files and the zdll.lib? The instructions say put the headers in a directory found in the INCLUDE path list and the zdll.lib into a directory in the LIB path list. Trying to find these path lists usually it says in visual studio directories option but now it says they deprecated that so I can't figure out which directory I should be putting these files. Thanks. Also it says to put the zdll.lib to the project so just in the main server folder where the readme is?
|
So since I didn't know what to do I took your advice and got the zlib source and built it in cmake. That worked well. But now what do I need to do? I tried compiling the server source again and got this error:
The C compiler identification is MSVC 19.0.24215.1 The CXX compiler identification is MSVC 19.0.24215.1 Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- works Detecting C compiler ABI info Detecting C compiler ABI info - done Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- works Detecting CXX compiler ABI info Detecting CXX compiler ABI info - done Detecting CXX compile features Detecting CXX compile features - done CMake Error at C:/Program Files/CMake/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:138 (message): Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR) Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE) C:/Program Files/CMake/share/cmake-3.7/Modules/FindZLIB.cmake:114 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:311 (FIND_PACKAGE) |
Compile the zlib project first and it will create a dll file.
The build version of this should match your build version of your server (Debug, Release, etc...) You will find a sub-folder named for the type of build you compiled. Copy the dll file from there and paste it twice: 1) In your server run folder 2) In the dependencies\zlib folder where you put the header files. You will need to rename both copies of the file to "zlib1.dll" You should be able to load up the server solution and compile at this point. EDIT: If you compiled with any debug info, you can also copy the linker files to your server directory to help with zlib-based crashes. |
hi I have the same issue and was not able to solve this problem:
when I compile the zlib project (from the website) i get a zlibd.dll which i rename to zlib1.dll and create a new folder in my serversource /dependencies/zlib where i copy this 1 file into my build folder is completly empty, but to comply with your 1) i also copy the dll into the empty build folder I still get the same cmake error any ideas? |
got it working, you need to have the zlib_x64 folder in the dependencies.
|
I am also getting the "Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)"
I have zlib_x64 (and also a copy of this called just zlib) in my source dependencies directory (with boost, libsodium etc) and it has subdirectories "include" and "lib". Any suggestions please? |
I found I needed ti install a copy of ZLIB, not just add it to the dependencies directory, then CMake could find it and progress past this part and onto the next error :(
|
All times are GMT -4. The time now is 07:15 AM. |
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.