invalid conversion error while compiling cegui-0.7.1

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

r.stiltskin
Just popping in
Just popping in
Posts: 3
Joined: Tue Mar 23, 2010 13:18

invalid conversion error while compiling cegui-0.7.1

Postby r.stiltskin » Tue Mar 23, 2010 13:29

While attempting to build cegui-0.7.1 in Ubuntu 8.04, make failed with the following error:

Code: Select all

Making all in DevILImageCodec
make[4]: Entering directory `/usr/local/ogre/CEGUI-0.7.1/cegui/src/ImageCodecModules/DevILImageCodec'
/bin/bash ../../../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../../../cegui/include -I../../../../cegui/include -I../../../../cegui/include/ImageCodecModules/DevILImageCodec -DUSE_DEVIL_LIBRARY    -g -O2 -MT libCEGUIDevILImageCodec_la-CEGUIDevILImageCodec.lo -MD -MP -MF .deps/libCEGUIDevILImageCodec_la-CEGUIDevILImageCodec.Tpo -c -o libCEGUIDevILImageCodec_la-CEGUIDevILImageCodec.lo `test -f 'CEGUIDevILImageCodec.cpp' || echo './'`CEGUIDevILImageCodec.cpp
mkdir .libs
 g++ -DHAVE_CONFIG_H -I. -I../../../../cegui/include -I../../../../cegui/include -I../../../../cegui/include/ImageCodecModules/DevILImageCodec -DUSE_DEVIL_LIBRARY -g -O2 -MT libCEGUIDevILImageCodec_la-CEGUIDevILImageCodec.lo -MD -MP -MF .deps/libCEGUIDevILImageCodec_la-CEGUIDevILImageCodec.Tpo -c CEGUIDevILImageCodec.cpp  -fPIC -DPIC -o .libs/libCEGUIDevILImageCodec_la-CEGUIDevILImageCodec.o
CEGUIDevILImageCodec.cpp: In member function ‘virtual CEGUI::Texture* CEGUI::DevILImageCodec::load(const CEGUI::RawDataContainer&, CEGUI::Texture*)’:
CEGUIDevILImageCodec.cpp:64: error: invalid conversion from ‘const void*’ to ‘ILvoid*’
CEGUIDevILImageCodec.cpp:64: error:   initializing argument 2 of ‘ILboolean ilLoadL(ILenum, ILvoid*, ILuint)’
make[4]: *** [libCEGUIDevILImageCodec_la-CEGUIDevILImageCodec.lo] Error 1
make[4]: Leaving directory `/usr/local/ogre/CEGUI-0.7.1/cegui/src/ImageCodecModules/DevILImageCodec'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/local/ogre/CEGUI-0.7.1/cegui/src/ImageCodecModules'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/ogre/CEGUI-0.7.1/cegui/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/ogre/CEGUI-0.7.1/cegui'
make: *** [all-recursive] Error 1



Would any additional information be helpful?
Please advise. Thanks.

Edit: added a few lines preceding the error to the above output to provide context. I am using gcc 4.2.4.
Also, I just tried CEGUI-0.6.2 and it compiled completely -- no problems noted.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: invalid conversion error while compiling cegui-0.7.1

Postby CrazyEddie » Tue Mar 23, 2010 15:53

Hi,

This is a incompatibility between the CEGUI code and the version of DevIL you are building against (1.6.?)? When the 1.7.something version of DevIL was released they broke the interface and we duly incorporated a fix, however it messes up support for the old (basically obsolete) versions of DevIL. You have a choice to make, as far as a fix goes:

1) Update the DevIL version to 1.7.8 or some similar newer release.
- or -
2) Disable the build of the DevIL codec, and use some other lib: pass --disable-devil to configure to do this.
- or -
3) Go into the file CEGUIDevilImageCodec.cpp and at line 64 and change the static_cast<const void*> to a c-style cast to cast types and cast away const, like: (ILvoid*)

HTH

CE

r.stiltskin
Just popping in
Just popping in
Posts: 3
Joined: Tue Mar 23, 2010 13:18

Re: invalid conversion error while compiling cegui-0.7.1

Postby r.stiltskin » Wed Mar 24, 2010 03:55

Changing the cast seemed the easiest way to go, and it has now compiled successfully. I'm sure this will be fine for my purposes. Thanks.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 7 guests