It appears that it is impossible to compile Irrlicht in x64 mode on GCC.
It spawns the following linker errors:
obj\IrrReleasegcc64\libpng\png.o:png.c:(.text+0xbc7): undefined reference to `png_mmx_support'
obj\IrrReleasegcc64\libpng\pngpread.o:pngpread.c:(.text+0x7fd): undefined reference to `png_read_filter_row'
obj\IrrReleasegcc64\libpng\pngpread.o:pngpread.c:(.text+0x8cf): undefined reference to `png_do_read_interlace'
obj\IrrReleasegcc64\libpng\pngpread.o:pngpread.c:(.text+0x2064): undefined reference to `png_combine_row'
obj\IrrReleasegcc64\libpng\pngread.o:pngread.c:(.text+0x107d): undefined reference to `png_combine_row'
obj\IrrReleasegcc64\libpng\pngread.o:pngread.c:(.text+0x10a5): undefined reference to `png_combine_row'
obj\IrrReleasegcc64\libpng\pngread.o:pngread.c:(.text+0x113d): undefined reference to `png_combine_row'
obj\IrrReleasegcc64\libpng\pngread.o:pngread.c:(.text+0x11a6): undefined reference to `png_read_filter_row'
obj\IrrReleasegcc64\libpng\pngread.o:pngread.c:(.text+0x11f1): undefined reference to `png_do_read_interlace'
obj\IrrReleasegcc64\libpng\pngread.o:pngread.c:(.text+0x1279): undefined reference to `png_combine_row'
I've looked into it, and there really isn't a reason for it. It just doesn't want to work. Oh well.
[fixed]Irrlicht x64: libpng does not properly compile
-
- Posts: 81
- Joined: Sat Sep 09, 2006 6:46 am
-
- Posts: 81
- Joined: Sat Sep 09, 2006 6:46 am
Nevermind, found a solution. Just have to force it to add these functions by editing the if statements like so:
BEFORE:
#if !defined(PNG_USE_PNGGCCRD) && \
!(defined(PNG_MMX_CODE_SUPPORTED) && defined(PNG_USE_PNGVCRD))
AFTER:
#if (!defined(PNG_USE_PNGGCCRD) && \
!(defined(PNG_MMX_CODE_SUPPORTED) && defined(PNG_USE_PNGVCRD))) || defined(WIN64)
BEFORE:
#if !defined(PNG_USE_PNGGCCRD) && \
!(defined(PNG_MMX_CODE_SUPPORTED) && defined(PNG_USE_PNGVCRD))
AFTER:
#if (!defined(PNG_USE_PNGGCCRD) && \
!(defined(PNG_MMX_CODE_SUPPORTED) && defined(PNG_USE_PNGVCRD))) || defined(WIN64)
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Hmm, I added -DPNG_NO_MMX_CODE to the Makefile in order to make the library compiler properly. Works without touching the lib code. However, I also changed some types which were int before, and are now long (it's in SVN trunk, so using that version should be safe). Don't know how the libpng people handle it usually, maybe the configure script would take care for this stuff.