Log in

View Full Version : Overcoming fatal error unable to open "Zlib.lib"


dew1960
08-11-2012, 11:32 PM
Success!

Just a Heads up for anyone encountering annyoing fatal errors about not being able to open zlib.lib file when compiling:

I Used VS 2008 Express, MySQL Server ver 5.1.61-win32,and ActivePerl-5.12.4.1205-MSWin32-x86-294981.

I installed to the c:\ root directory and also unzipped the zlib compressed file download.


Note: The "zlib.lib" file was missing from the posted source. I obtained a copy from a previous server I had set up (I saved my old installation files to the server folder after I compiled it).

I opened up the file with and editor and posted the code here for anyone that is missing that file and getting the fatal error's related to being unable to access 'zlib.lib".

Go to your zlilb\lib\ folder and start a new txt file but save it as "zlib.lib" and choose "all files for the file type" (in Windows). Then if that was your only compile error, you should be able to compile with no more errors. Ignore the warnings, it is only errors you have to be concerned with.


I hope this helps. I know how frustrating it can be when you keep trying to compile and get errors every time. :(

With Any luck your result will be like mine:


6>Build log was saved at "file://c:\Source\trunk\EQEmuServer\ucs\Debug\BuildLog.htm"
6>ucs - 0 error(s), 85 warning(s)
========== Build: 6 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========




LIBRARY
; zlib data compression library

EXPORTS
; basic functions
zlibVersion
deflate
deflateEnd
inflate
inflateEnd
; advanced functions
deflateSetDictionary
deflateCopy
deflateReset
deflateParams
deflateBound
deflatePrime
inflateSetDictionary
inflateSync
inflateCopy
inflateReset
inflateBack
inflateBackEnd
zlibCompileFlags
; utility functions
compress
compress2
compressBound
uncompress
gzopen
gzdopen
gzsetparams
gzread
gzwrite
gzprintf
gzputs
gzgets
gzputc
gzgetc
gzungetc
gzflush
gzseek
gzrewind
gztell
gzeof
gzclose
gzerror
gzclearerr
; checksum functions
adler32
crc32
; various hacks, don't look :)
deflateInit_
deflateInit2_
inflateInit_
inflateInit2_
inflateBackInit_
inflateSyncPoint
get_crc_table
zError




Have a Happy Day!

sorvani
08-12-2012, 09:39 AM
zlib is included in the SVN repository. just link to it correctly when you set up your library and include directories.

dew1960
08-12-2012, 12:11 PM
It was missing from mine when I downloaded it. If it wasn't missing, would I bother to post this? Others have had the same problem too so this is for anyone else that might be missing the file.

And yes, I did have the correct directories linked in the VC++ directories. Why do people just assume that you didn't do that right?

sorvani
08-12-2012, 01:22 PM
because if you are actually checking out the SVN correctly it is impossible to not have the required zlib files.

lerxst2112
08-12-2012, 05:55 PM
What you posted is the def file, not the actual library you would statically link against to eliminate the need for the DLL.

http://i.imgur.com/Jfjox.png

Looks like it's in SVN to me.

dew1960
08-12-2012, 07:00 PM
Well that was the file that I was missing anyway. I probably had an older version that I downloaded last year. I did notice other people posted that they were missing it too. At one point there was a file that had to be renamed. Anyway, if there is no issue now, you can just ignore this post. No need to keep commenting.

Have a nice day!

lerxst2112
08-12-2012, 07:12 PM
We're just pointing out that there's a right way to solve the problem, and your way.

dew1960
08-12-2012, 07:27 PM
OK, I see your point. I didn't know it was in the repository. I had been following the guide in this post: http://www.eqemulator.org/forums/showthread.php?t=32980

The compressed file it links to on sourceforge does not contain the same contents as what you posted in the screenshot above. It is probably the reason for my compile errors. Doh!

I had a lot of problems. There are several guides/posts on the board and they don't all have the same information and this one is actually quite outdated now. There are now 6 parts in the source project instead of 5. I was following step by step but apparently it is no longer accurate. Perhaps an admin can remove all the old guide posts to an archive or something and clear up the outdated info on this board. It doesn't help if it is no longer correct.

Can you PLEASE point me to the correct, latest, and most up to date Windows server setup guide? Apparently I missed it in my searches. I feel like I have been banging my head against a wall for days and maybe I have just been going about it all the wrong and probably outdated way.

My apologies for my attitude, it just seems people are quick to snype or post snyde remarks in this forum and being exhausted and frustrated I reacted. I won't let it bother me anymore, so no more worries there!

Ugh. Have a nice day folks! (Sincerely)

lerxst2112
08-12-2012, 10:17 PM
Anyone can write a guide, but nobody has lately, so that is the most recent one. The problem with guides is they are often out of date within a few days or weeks of writing them. For the most part, any guide is still applicable, you just need to fill in a few blanks where there are things missing or filenames don't match up.

sorvani
08-12-2012, 11:21 PM
or actually read every post in the guide thread because many things get posted as time progresses.