Hello everyone! I'm trying to use DevIL with Xcode but I can't get it to work.
I tried using the "standard" method by doing "configure make make install" and using #import <IL/il> but it doesn't work. It identifies the library but I still get some compiling errors:
Undefined symbols: "_ilConvertImage", referenced from: terreno() in main.o "_ilGetInteger", referenced from: terreno() in main.o terreno() in main.o terreno() in main.o "_ilLoadImage", referenced from: terreno() in main.o "_ilBindImage", referenced from: terreno() in main.o "_ilGetData", referenced from: terreno() in main.o "_ilInit", referenced from: terreno() in main.o "_ilGenImages", referenced from: terreno() in main.o ld: symbol(s) not found collect2: ld returned 1 exit status`
So I tried do it by using the macports libdevil install. It installed correctly but nothing seems to work. Do I need to change my #import declarations?
Any suggestion to install DevIL on the Mac correctly and use it in a Xcode Project?
I've tried almost everything!
That includes: building from source, installing from macports, building older versions, googling the whole internet, …
There's so little information on this subject… And I really need this for a school project.
Please help.
Thanks a lot!
Miguel.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
thank you for your feedback.
Could you try to use the latest tarball (= the prerelease)?
Try to run 'make check' after configure and if something goes wrong (either test fails or the lib doesn't work), attach the config.log file (it is created by the configure script)
Regards,
Matej
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for trying to help!
I hope I made myself clear in the above explanation.
Oh, and I could not find how to attach files, so I uploaded them. It's safe.
Regards,
Miguel.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Very good, you have just exposed a glitch within the build system.
Although I don't really understand the Mac frameworks stuff, the reason of the failiure is different.
Possible solutions:
- Wait for the bugfix release
- Pass the '-disable-icon' option to the configure script.
- Pass the 'CPPFLAGS=-I/opt/local/include/libpng12 LDFLAGS=-L/opt/local/lib' to the configure script
The problem is that the ICON component of DevIL uses LIBPNG, but the LIBPNG flags are not passed to it at the moment.
So you either disable that format (it is not a very important one), or you tell the whole DevIL where your LIBPNG library is.
Regards,
Matej
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok. Nothing to worry about, I think. PSD files aren't supported, but the library seems to be compiled successfully.
Now, when I try to use DevIL on my Xcode, i get this whenever I use a DevIL function:
I've configured Xcode to look up for includes on "/usr/local/include" and to compile the project with "-lil -lilu -lilut" flags.
If you need the code I'm trying to compile, please tell me, but it came directly from a windows machine on wich it worked. Or at least didn't give any errors, though…
Thank you for your help, and it is a pleasure to contribute.
Miguel.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The trouble the PSD format makes is hard to understand for me.
Anyway, good news is that all other tests went fine, congratulations!
Anyway, try to pass `pkg-config -libs ILU` to your program.
OR try to link with -lIL -lILU (the upper case matters).
I don't have a very good feeling about ILUT, it is quite outdated…
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Take a look what command is used to compile programs during "make check" run (when you compile DevIL)
All compile commands are visible there.
Anyway, try running "pkg-config -libs ILU" in your shell.
And you should have some libIL.* files in your library path, check up on that, too.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK, these are flags that you have to pass to the linker.
The default location of library installation depends on your system configuration, so I would leave like it is.
Anyway, try to google how to use pkg-config with Xcode, it is a quite useful thing.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello everyone! I'm trying to use DevIL with Xcode but I can't get it to work.
I tried using the "standard" method by doing "configure make make install" and using #import <IL/il> but it doesn't work. It identifies the library but I still get some compiling errors:
Ld build/Release/cg.app/Contents/MacOS/cg normal i386 cd "/Users/simaorfreitas/Documents/LESI/3º ano/CG/CGaula1" /Developer/usr/bin/g++-4.2 -arch i386 "-L/Users/simaorfreitas/Documents/LESI/3º ano/CG/CGaula1/build/Release" "-F/Users/simaorfreitas/Documents/LESI/3º ano/CG/CGaula1/build/Release" -filelist "/Users/simaorfreitas/Documents/LESI/3º ano/CG/CGaula1/build/CGaula1.build/Release/cg.build/Objects-normal/i386/cg.LinkFileList" -framework Foundation -framework AppKit -framework GLUT -framework OpenGL -framework Cocoa -framework AppKit -o "/Users/simaorfreitas/Documents/LESI/3º ano/CG/CGaula1/build/Release/cg.app/Contents/MacOS/cg"
Undefined symbols: "_ilConvertImage", referenced from: terreno() in main.o "_ilGetInteger", referenced from: terreno() in main.o terreno() in main.o terreno() in main.o "_ilLoadImage", referenced from: terreno() in main.o "_ilBindImage", referenced from: terreno() in main.o "_ilGetData", referenced from: terreno() in main.o "_ilInit", referenced from: terreno() in main.o "_ilGenImages", referenced from: terreno() in main.o ld: symbol(s) not found collect2: ld returned 1 exit status`
So I tried do it by using the macports libdevil install. It installed correctly but nothing seems to work. Do I need to change my #import declarations?
Any suggestion to install DevIL on the Mac correctly and use it in a Xcode Project?
I've tried almost everything!
That includes: building from source, installing from macports, building older versions, googling the whole internet, …
There's so little information on this subject… And I really need this for a school project.
Please help.
Thanks a lot!
Miguel.
Hello,
thank you for your feedback.
Could you try to use the latest tarball (= the prerelease)?
Try to run 'make check' after configure and if something goes wrong (either test fails or the lib doesn't work), attach the config.log file (it is created by the configure script)
Regards,
Matej
Well, tried
And then
, here's the output (from the first line that gives error to the last one) :
And here's the config.log: http://dl.dropbox.com/u/2847878/DevIL/config_with_ILU_ILUT.log
If i run
, the output is exactly the same as the above, and here's the config.log i got: http://dl.dropbox.com/u/2847878/DevIL/config.log
Thanks for trying to help!
I hope I made myself clear in the above explanation.
Oh, and I could not find how to attach files, so I uploaded them. It's safe.
Regards,
Miguel.
I've red in the changlog that you once provided an Xcode pre compiled framework, but then it was discontinued.
Can you provide us that old framework for Xcode?
An old version it's better than no version. :\
I would love to have this brilliant library on my mac. Thanks!
Very good, you have just exposed a glitch within the build system.
Although I don't really understand the Mac frameworks stuff, the reason of the failiure is different.
Possible solutions:
- Wait for the bugfix release
- Pass the '-disable-icon' option to the configure script.
- Pass the 'CPPFLAGS=-I/opt/local/include/libpng12 LDFLAGS=-L/opt/local/lib' to the configure script
The problem is that the ICON component of DevIL uses LIBPNG, but the LIBPNG flags are not passed to it at the moment.
So you either disable that format (it is not a very important one), or you tell the whole DevIL where your LIBPNG library is.
Regards,
Matej
Great! We're making progress.
Now, when I run "./configure -enable-ILU -enable-ILUT CPPFLAGS=-I/opt/local/include/libpng12 LDFLAGS=-L/opt/local/lib", I get the following log:
http://dl.dropbox.com/u/2847878/DevIL/new_config.log
The output of configure was normal.
But the make check went like this:
Ok. Nothing to worry about, I think. PSD files aren't supported, but the library seems to be compiled successfully.
Now, when I try to use DevIL on my Xcode, i get this whenever I use a DevIL function:
I've configured Xcode to look up for includes on "/usr/local/include" and to compile the project with "-lil -lilu -lilut" flags.
If you need the code I'm trying to compile, please tell me, but it came directly from a windows machine on wich it worked. Or at least didn't give any errors, though…
Thank you for your help, and it is a pleasure to contribute.
Miguel.
The trouble the PSD format makes is hard to understand for me.
Anyway, good news is that all other tests went fine, congratulations!
Anyway, try to pass `pkg-config -libs ILU` to your program.
OR try to link with -lIL -lILU (the upper case matters).
I don't have a very good feeling about ILUT, it is quite outdated…
It's not working.
Let me try with g++, without Xcode.
What would be a normal command for g++ to compile a simple program using DevIL?
Take a look what command is used to compile programs during "make check" run (when you compile DevIL)
All compile commands are visible there.
Anyway, try running "pkg-config -libs ILU" in your shell.
And you should have some libIL.* files in your library path, check up on that, too.
I got this:
-L/opt/local/lib -lILU -lIL -ltiff -lpng12 -lmng -llcms -ljasper -ljpeg
I don't really understand what this means. :\
And shouldn't the library be in /usr/local/lib ?
OK, these are flags that you have to pass to the linker.
The default location of library installation depends on your system configuration, so I would leave like it is.
Anyway, try to google how to use pkg-config with Xcode, it is a quite useful thing.