[fixed]static lib problem

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
AReichl
Posts: 268
Joined: Wed Jul 13, 2011 2:34 pm

[fixed]static lib problem

Post by AReichl »

This is not REALLY important, but i would like to mention, that irrlicht does not compile as a static lib any more (Visual Studio; i have not checked with gcc yet). The problem is with the newer libpng. There are new functions in pngwrite.c, which won't compile.
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: static lib problem

Post by CuteAlien »

Which VS compiler and which Irrlicht version? I tried svn trunk with VS 2010 and that still works (32 bit and 64bit).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
AReichl
Posts: 268
Joined: Wed Jul 13, 2011 2:34 pm

Re: static lib problem

Post by AReichl »

Latest trunk ( of course ! ) and Visual Studio 2010.

I just created a fresh trunk directory and just opened the VS2010 solution without any changes, but still have the same problem:

libpng\pngwrite.c(1572): error C2440: 'function' : cannot convert from 'void (__fastcall *)(png_structp,png_const_charp)' to 'png_error_ptr'
1>libpng\pngwrite.c(1572): warning C4024: 'png_create_write_struct' : different types for formal and actual parameter 3
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: static lib problem

Post by CuteAlien »

Can't reproduce... even when compiling just the file.
If you go over the variable PNG_LIBPNG_VER_STRING in that line in VS - what's the value it shows you? Here: PNG_LIBPNG_VER_STRING "1.6.2"
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
AReichl
Posts: 268
Joined: Wed Jul 13, 2011 2:34 pm

Re: static lib problem

Post by AReichl »

same version here.

Only difference i could think of is:
- VS2010 OR VSExpress2010
- with or without Service Pack 1
(of course there SHOULD be no difference, but who knows, hehe).
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: static lib problem

Post by CuteAlien »

Professional with SP1 and on Windows 7, but I found out what you do. You compile with Fast CPU which I never used. And so the problem seems to be that __fastcall is used in one place (and probably __cdecl in the other).

So in this situation in pngconf.h we should probably have
# define PNGCAPI __fastcall
instead of
# define PNGCAPI __cdecl

Modifying library headers is certainly ugly... (must remember on next update)... maybe someone has a better idea? Also not sure right now if we already can figure out if this compile-setting is used...
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
AReichl
Posts: 268
Joined: Wed Jul 13, 2011 2:34 pm

Re: static lib problem

Post by AReichl »

ahumpf - yes - i always use(d) "fast FPU".
Ok - the "normal" static libraries (Debug,Release) work and i will use them.
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: static lib problem

Post by CuteAlien »

I changed the project file now - Irrlicht should at least compile with the settings it has :-)
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply