User forums > Help

DevIL (LIB Files?)

<< < (3/3)

MortenMacFly:
I believe the order of the libs is wrong. If e.g. DevIL.lib depends on ILU.lib then this won't work this way. In addition you are linking several libs multiple times. This makes no sense. Check your project and target options (linker) accordingly. What's the right order for the libs to link? Check the SDK's manual, examples or ask the dev's of this lib.
With regards, Morten.

Aardwolf:
D'oh!

I did "some" stuff, and it gave me an error; I searched something I saw in the error and it took me to a page on these forums about not installing the new MinGW!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

So... now what do I do?

/mingw/lib/crt2.o:crt1.c:(.text+0x16a): undefined reference to `__cpu_features_init'

^^^ BAD

arturomdn:
I had the same problem trying to use DevIL with Code::Blocks and mingw.

I followed the instructions in this website (translated from German):
http://translate.google.com/translate?hl=en&sl=de&u=http://www.softgames.de/forum/frage103609.html&sa=X&oi=translate&resnum=2&ct=result&prev=/search%3Fq%3D_imp__ilGetInteger%26hl%3Den%26lr%3D%26sa%3DG

These are instructions for converting .DLL to lib*.a suitable for Code::Blocks and mingw.

I downloaded the latest DevIL binaries for Windows

http://internap.dl.sourceforge.net/sourceforge/openil/Devil-1.6.8-rc2-win-.zip

Then issued the following commands, per the instructions:

pexports ILUT.dll > ILUT.def
pexports ILU.dll > ILU.def
pexports DevIL.dll > DevIL.def

dlltool --input-def ILU.def --dllname ILU.dll --output-lib libILU.a
dlltool --input-def ILUT.def --dllname ILUT.dll --output-lib libILUT.a
dlltool --input-def DevIL.def --dllname DevIL.dll --output-lib libDevIL.a

move lib*.a \Dev-Cpp\lib

"c:\Dev-Cpp\lib" is listed in Code::Blocks in Project->Build Options->Directories->Linker

Voila, those pesky _imp__* linker errors went away :-)

Hope this helps.

Aardwolf:
Yeah I did something which (I think) was equivalent to that; I did

reimp DevIL.lib
reimp ILU.lib
reimp ILUT.lib

and I put those new .a files in \lib,

but then I discovered that the new version of MinGW had a terrible terrible error:

/mingw/lib/crt2.o:crt1.c:(.text+0x16a): undefined reference to `__cpu_features_init'

So I guess what I'm asking is,
HOW DO I SWITCH TO AN OLDER VERSION OF MINGW and SET UP CODE::BLOCKS TO RECOGNIZE IT?

Aardwolf:
This is what is commonly known as

       THREAD NECROMANCY         


 but...




I have returned to this IDE, MinGW, and DevIL in the hopes that it might help me load JPEG's, which everyone knows are much smaller than BMP files. However, after deciding to actually try what arturomdn said on January 25, 2007, i got exactly the same errors as before.

Suggestions welcome.



Edit (edit not made on a computer with Code::Blocks or my project on it):

I followed arturomdn's suggestion precisely, and while this did manage to fix the problem of it giving an error when it doesn't find the correct static library files, it has resumed with the "undefined reference to '_imp__*'" errors.

Navigation

[0] Message Index

[*] Previous page

Go to full version