Serebriakov / pink-pony

Automatically exported from code.google.com/p/pink-pony
0 stars 0 forks source link

Does not compile with older version of DevIL #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi

Im compiling in Ubuntu 8.10, kernel 2.6.27-14-generic, and I get this message:

scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o lib/Texture2D.o -c -Wall -Wextra -Wno-unused-parameter -O2
-I/usr/include/OpenEXR -I./lib -I./external/tinyXML -pthread
-I/usr/include/OpenEXR -I/build/buildd/glfw-2.6/debian/tmp/usr/include
-I/usr/include/FTGL -I/usr/include/freetype2 -I/usr/include/sigc++-2.0
-I/usr/lib/sigc++-2.0/include lib/Texture2D.cc
lib/Texture2D.cc: In constructor 'Texture2D::Texture2D(const char*, GLenum,
GLenum, GLenum, GLenum)':
lib/Texture2D.cc:52: error: invalid conversion from 'const char*' to 'char*'
lib/Texture2D.cc:52: error:   initializing argument 1 of 'ILboolean
ilLoadImage(char*)'
scons: *** [lib/Texture2D.o] Error 1
scons: building terminated because of errors.

Am I just using an older library maybe? Im using libglfw 2.6.1 from the repos.

Many thanks!

Original issue reported on code.google.com by wesley.w...@gmail.com on 29 Sep 2009 at 8:28

GoogleCodeExporter commented 9 years ago
NOTE: The issue title is incorrect, I solved that issue by trying a different
approach, and I forgot to change the title, and cant edit it now. My bad.

Original comment by wesley.w...@gmail.com on 29 Sep 2009 at 8:30

GoogleCodeExporter commented 9 years ago
Hello,

The problem seems to come from you using an old version of DevIL.

This version still uses non-const strings for arguments to library functions.
Implicit conversion from a constant string to a normal one results in an error.

Try updating the library.

Original comment by gin...@gmail.com on 30 Sep 2009 at 7:36

GoogleCodeExporter commented 9 years ago
Thanks for the prompt reply!

The Intrepid repos only have 1.6.7-5.2, I assume you're talking about version
1.7.5-4, which I can only find for Jaunty or Karmic. Funnily enough I'm having 
a hard
time finding the source for it, and they only have binaries for the other said 
releases.

I will keep looking :)

Original comment by wesley.w...@gmail.com on 30 Sep 2009 at 6:47

GoogleCodeExporter commented 9 years ago
You can find the current version of DevIL here:
http://openil.sourceforge.net/download.php

As a quick fix you can simply cast the string argument at lib/Texture2D.cc:52 
to char*:

    bool success = ilLoadImage((char*)path);

Original comment by gin...@gmail.com on 30 Sep 2009 at 9:40

GoogleCodeExporter commented 9 years ago

Original comment by gin...@gmail.com on 30 Sep 2009 at 9:41

GoogleCodeExporter commented 9 years ago
Thanks for the link, I updated DevIL to 1.7.8 and it compiled fine.

Unfortunately it doesn't run: shader/slang/slang_emit.c:297: storage_to_src_reg:
Assertion

However thats just a result of bad Intel driver support on my board, which I 
will
work on (for reference the link to that is
http://www.phoronix.com/forums/showthread.php?t=14235&page=6 post #57)

Thanks for helping me get this far!

Original comment by wesley.w...@gmail.com on 1 Oct 2009 at 7:07

GoogleCodeExporter commented 9 years ago

Original comment by gin...@gmail.com on 3 Oct 2009 at 11:31