CEGUI doesn't build

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

Gan
Just popping in
Just popping in
Posts: 1
Joined: Thu May 05, 2016 22:07

CEGUI doesn't build

Postby Gan » Thu May 05, 2016 22:09

I followed the readme steps:
```bash
cd $cegui_folder
# you can call the folder differently but "build" is customary
mkdir build/
cd build/
# run the configure step
cmake-gui ../
# fix any issues pointed out by cmake
# not all dependencies are required so if some are not found, don't panic and carry on!
# alternative (if you are a command line pro)
# cmake ../
```

At this point, Makefiles, project files or something else will be generated. Next step depends on which that is.

For Makefiles, just run
```bash
cd $cegui_folder
cd build/
make
```


This is the command line output:
build Matt$ make
[ 79%] Built target CEGUIBase-0
[ 80%] Built target CEGUIExpatParser
[ 81%] Built target CEGUILibXMLParser
[ 82%] Building CXX object cegui/src/ImageCodecModules/SDL2/CMakeFiles/CEGUISDL2ImageCodec.dir/ImageCodec.cpp.o
/Users/Matt/Downloads/cegui-0.8.7/cegui/src/ImageCodecModules/SDL2/ImageCodec.cpp:40:10: fatal error:
'SDL2/SDL_image.h' file not found
#include <SDL2/SDL_image.h>
^
1 error generated.
make[2]: *** [cegui/src/ImageCodecModules/SDL2/CMakeFiles/CEGUISDL2ImageCodec.dir/ImageCodec.cpp.o] Error 1
make[1]: *** [cegui/src/ImageCodecModules/SDL2/CMakeFiles/CEGUISDL2ImageCodec.dir/all] Error 2
make: *** [all] Error 2


I installed SDL from the website. And I installed SDL_image. Still doesn't build.

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: CEGUI doesn't build

Postby YaronCT » Fri May 06, 2016 05:04

Gan: This is a bug in cegui. I'll fix it soon.

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: CEGUI doesn't build

Postby YaronCT » Fri May 06, 2016 07:35

Gan: I've pushed a fix. Plz update your cegui source from the cegui mercurial repository (branch v0-8).

lucebac
Just can't stay away
Just can't stay away
Posts: 193
Joined: Sat May 24, 2014 21:55

Re: CEGUI doesn't build

Postby lucebac » Fri May 06, 2016 13:10

This is NOT a bug in CEGUI. You just have to install the SDL2 and SDL2_image package which can be found here:
https://www.libsdl.org/download-2.0.php
https://www.libsdl.org/projects/SDL_image/

If you already have, you might need to adjust the paths to the files in CMake if they are not in the standard paths (I don't know them for MacOSX, though, but there should definitely be some include directory on the disk somewhere)

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: CEGUI doesn't build

Postby YaronCT » Fri May 06, 2016 14:12

lucebac: I'm afraid it was a bug in cegui (which is now fixed). From "FindSDL2.cmake":

# Note that the header path has changed from SDL2/SDL.h to just SDL.h
# This needed to change because "proper" SDL2 convention
# is #include "SDL.h", not <SDL2/SDL.h>. This is done for portability
# reasons because not all systems place things in SDL2/ (see FreeBSD).

lucebac
Just can't stay away
Just can't stay away
Posts: 193
Joined: Sat May 24, 2014 21:55

Re: CEGUI doesn't build

Postby lucebac » Fri May 06, 2016 14:18

Then you need to change CMake to set appropriate defines whether SDL2 is in /SDL2/ or not. Ubuntu for example does put the files into a SDL2 subdirectory, so you broke the CEGUI build at least for ubuntu (ref: http://packages.ubuntu.com/yakkety/amd6 ... v/filelist). But I assume that only *BSD doesn't put SDL2 into a corresponding subdirectory.
Or add a fallback if /SDL2/ was not found. But the convention they proposed is pretty weird, since both SDL1 and SDL2 have the same paths to and names of their headers then but the API did completely change between those two versions. This makes things even worse.

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: CEGUI doesn't build

Postby YaronCT » Fri May 06, 2016 14:24

lucebac: I didn't break systems like ubuntu that put the sdl headers in "/usr/include/SDL2" coz "FindSDL2.cmake" searches for SDL headers in various places, including "/usr/include/SDL2", and adds the found directory to the include path. Trust me, I'm on debian, and it works..

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: CEGUI doesn't build

Postby YaronCT » Fri May 06, 2016 14:28

Now y SDL chose to make this mess is another question, but that's something u should ask them. I try to follow the official SDL instructions.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 11 guests