I'm new to CEGUI, and I am having problems compiling the library. In fact I'm having trouble compiling the dependencies:
The error I am seeing is this:
Linking C shared library ..\..\..\dependencies\bin\liblibpng.dll
cd /d C:\Cpp\cegui-deps-0.8.x-src\src\libpng-1.4.7\CEGUI-BUILD && "C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -E cmake_link_script CMakeFiles\libpng.dir\link.txt --verbose=1 "C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -E remove -f CMakeFiles\libpng.dir/objects.a
C:\MinGW\bin\ar.exe cr CMakeFiles\libpng.dir/objects.a @CMakeFiles\libpng.dir\objects1.rsp
C:\MinGW\bin\gcc.exe ..\scripts\pngwin.def -shared -o ..\..\..\dependencies\bin\liblibpng.dll -Wl,--out-implib,..\..\..\dependencies\lib\dynamic\liblibpng.dll.a -Wl,--major-image-version,0,--minor-image-version,0 -Wl,--whole-archive CMakeFiles\libpng.dir/objects.a -Wl,--no-whole-archive ..\..\..\dependencies\lib\dynamic\libzlib.dll.a -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
c:/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../../mingw32/bin/ld.exe: ..\scripts\pngwin.def:5: syntax error
c:/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../../mingw32/bin/ld.exe:..\scripts\pngwin.def: file format not recognized;treating as linker script
c:/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../../mingw32/bin/ld.exe:..\scripts\pngwin.def:1: syntax error
collect2.exe: error: ld returned 1 exit status
src\libpng-1.4.7\CEGUI-BUILD\CMakeFiles\libpng.dir\build.make:455: recipe for target 'dependencies/bin/liblibpng.dll' failed
Mingw32-make[2]: *** [dependencies/bin/liblibpng.dll] Error 1
Mingw32-make[2]: Leaving directory 'C:/Cpp/cegui-deps-0.8.x-src'
CMakeFiles\Makefile2:211: recipe for target 'src/libpng-1.4.7/CEGUI-BUILD/CMakeFiles/libpng.dir/all' failed
Mingw32-make[1]: *** [src/libpng-1.4.7/CEGUI-BUILD/CMakeFiles/libpng.dir/all] Error 2
Mingw32-make[1]: Leaving directory 'C:/Cpp/cegui-deps-0.8.x-src'
Makefile:74: recipe for target 'all' failed
Mingw32-make: *** [all] Error 2
I am using gcc 4.7.2 , cmake version 2.8.12
I have never built a DLL with a manual def file before but I believe that the problem is that the def file provided does not work with gcc
;------------------------------------------
; LIBPNG module definition file for Windows
;------------------------------------------
LIBRARY
EXPORTS
;Version 1.4.7
png_build_grayscale_palette
png_chunk_error
png_chunk_warning
...
According to:http://gcc.gnu.org/onlinedocs/gnat_ugn_unw/The-Definition-File.html
after the keyword LIBRARY you should put the name of the Library.
If I use LIBRARY png (instead of LIBRARY) the dll is created..
Does anyone have any experience compiling on windows with Mingw32?
Anyone else has a similar problem?
Any idea if this solution will work?
Thanks
Oded