Development > Newbie Coding

compile using MinGW

<< < (3/6) > >>

Muton:
I'm currently updating the MinGW environment
Because of this i try to update libpng too along with SDL (to clean up *.dlls)
and there i have a problem

Compiling SDL was easy but if i try to compile ufomodel using C::B
i run into a linking error
D:\temp\UFOAIwin32BUILDenv\MinGW\lib\libpng.a(libpng14_la-pngwrite.o):pngwrite.c|| undefined reference to `deflateEnd'| ...
Thats a zlib error?!
The problem is i need to add -lpng to compile ufomodel
-lSDLmain alone will cause this error

looking to libSDLmain.a resolve
that mine is only 4kb in size while the original is 200kb big
I can compile ufomodel under MinGW by the way

Mattn:
add -lz - libpng needs libz (or zlib)

Muton:
I did not read the manual ....
got it running :)

Muton:
I've learned something today

I'm building SDL from source to reduce the amount of dlls we need to run our programs

This task is somewhat finished and i tried to build ufomodel
One time directly under MinGW and than using C::B
Under Mingw is everything working as expected
meaning every requested dll correspond to your libs
but under C::B we need to include "every" lib we need
If you dont include png12 || png14 ufomodel will cry for libpng3.dll
instead of libpng12-0.dll || libpng14-14.dll.
It seams to be some sort of fall-back for png if you dont include pngxx
even if you include png which refers to png12 || png14 ...
Meaning including png (-lpng) will result in libpng3.dll

Its confusing
SDL_image request png12 || png14
libpng request zlib
and ufomodel itslef need zlib && libpng
But you dont need to add zlib (-lz), but png(12||14)

This seams to be the reason why we need so much dlls

I've added png14 (because SDL_image was compiled against png14)
The result was that ufomodel.exe requests the same dlls as SDL_mixer.dll

bayo:

--- Quote ---I'm building SDL from source to reduce the amount of dlls
--- End quote ---
I really dont see the point. Nowhere it will be a gain.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version