Opened 6 years ago
Closed 4 years ago
#49 closed defect (fixed)
windows zlib1.dll error entrypoint missing
|Reported by:||HoraK-FDF||Owned by:||PulkoMandy|
Description (last modified by )
i have just compiled GrafX2 from svn rev. 2171 with mingw32 but the following error occurred when starting grafx2.exe:
(i hope i translated it right at least the sense should be the same)
grafx2.exe - entrypoint not found
The procedureentrypoint "inflateReset2" could not found in the DLL "zlib1.dll"
i resolved the problem by loading the latest zlib1.dll(v1.28) from its official page and overwriting the old one. So the currently included dll on svn must be also replaced i think.
there where also many warnings while compiling should i attach them?
Change History (10)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
i have got the dll from here http://zlib.net/zlib128-dll.zip
and here are other things i had to make to get it run.
for sdl i have got it from here
and there i used this to get the sdl working
but because in the source files of grafx2 every sdlfile is called directly like #include <SDL.h> i got errors there are two ways to fix that, first quick and dirty copy all from mingw/include/SDL to mingw/include, thats not very nice but it works, i think you should consider to change the grafx2 sources to the layout of sdl so including a file from sdl would simply look like #include <SDL/SDL.h> in that way it is possible to have SDL2 installed at the same time sdl2 simply makes it this way #include <SDL2/SDL.h>
for sdl_image i have got it from here
there i have downloaded this
this file includes an SDL_image.lib i had to copy this file to mingw/lib/libSDL_image.a and the SDL_image.h that i copied to mingw/include (if SDL is in the form included like #include <SDL/SDL.h> it must copied to mingw/include/SDL). I don't know if this maybe cause errors somewhere because this lib is for VC the only other way would be to compile it from the file https://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.12.zip
for sdl_ttf i have got it from here
there i have downloaded this
this file includes an SDL_image.lib i had to copy this file to mingw/lib/libSDL_image.a and the SDL_image.h that i copied to mingw/include (if SDL is in the form included like #include <SDL/SDL.h> it must copied to mingw/include/SDL). I don't know if this maybe cause errors somewhere because this lib is for VC the only other way would be to compile it from the file https://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-2.0.11.zip
for libpng i downloaded it from here
and there the file
First i simply entered make witch produces a shared library but that causes the final linking of grafx2 to fail so make static must be entered. then i have copyied the folders include+lib to the mingw directory.
for freetype i have got it from here:
and there i used the:
the freetype.lib inside i renamed it to libfreetype.a and copied along with the libfreetype.dll.a to mingw/lib and the include folder to mingw. This archive also contains an freetype-bcc.lib but thats in total different format than VC+mingw
for lua i have taken:
on the wiki page there stands liblua5.1 but because i already used lua52 commands with the 2.5wip so i thought that is ok i have testet some of my scripts and they have worked. in the src directory i have typed make mingw after that i have changed the lua53.dll to liblua.dll.a and copied it along with the liblua.a to mingw/lib. I copied all .h files in the src directory to mingw/include
currently i'm trying to compile all that libraries that came as *.lib files from their sources with mingw but there are so many dependencies and errors that will take some time.
i append the compiling output right after that comment
btw i just throw this here because i thought a whole ticket for that is overkill maybe. In the gfx2def.ini and so in the gfx2.ini aswell there is a small typo:
; -3:Stretch by x3 maximum | -3:Etire au triple de taille si possible ; -4:Stretch by x4 maximum | -3:Etire au quadruple de taille si /\ this
by , 6 years ago
grafx2 warnings mingw32
comment:3 by , 6 years ago
#include <SDL.h> is the right way to do thing. If you don't believe us, read the FAQ on SDL website. The sdl-config script (which is run by the makefile) will add the proper -I options to the compiler command lines for it to work.
comment:4 by , 6 years ago
ok i found out why this happened.
in the sdl-config script there is a entry prefix= witch was set in my case to f:/MinGW so it could not find anything, after setting it to c:/MinGW all worked fine.
so that must be checked if sdl is installed to another folder other than the final. I had done this because i had not much room on c: and did not know how much it will take, now after knowing how much it is, i could have installed it directly there. Than all is fine with the #include <SDL.h> but its kind of strange to me because in that way i could not have installed sdl2 at the same time and use it an a program that need to switch between sdl/sdl2 for whatever reason (backward compatibility maybe)
comment:5 by , 6 years ago
It is not possible to mix SDL1 and SDL2 in the same program. They have conflicting function names and many other problems. SDL2 comes with sdl2-connfig which sets its own include paths as it needs.
This is common also for other projects, sometimes using the generic pkg-config system. GrafX2 makefiles will use that to detect Lua, for example.
comment:6 by , 5 years ago
I think we can mark this bug as resolved.
One can easily recompile the 3rd party libraries :
$ cd 3rdparty $ make
$ WIN32CROSS=1 make ;)
comment:7 by , 5 years ago
|Milestone:||2.5 → 2.6|
comment:8 by , 5 years ago
|Status:||new → assigned|
comment:9 by , 4 years ago
|Status:||assigned → closed|
Updating libraries is an endless race, IMO. This version of zlib1.dll may break libpng, which would need us to find an upgrade-friendly version, then it's SDL_Image which won't like the upgrade, etc....
If you go through the hassle, please, please, document what you're using - not only the version numbers, but the URLs or filenames of the things you had to download, and even HOW you managed to compile things when they don't work immediately, like I did in COMPILING.txt. (Many libraries don't compile/install out of the box for Mingw/MSYS)
*many* warnings mean you may have a very different of GCC from me. Can you please post/attach the compilation output, I'd like to have a look. However I can't promise to be fast, I don't have a home PC at the moment.