(solved) CELayoutEditor-0.5.0 compile error

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

schnorr
Just popping in
Just popping in
Posts: 14
Joined: Fri Jan 11, 2008 09:39

(solved) CELayoutEditor-0.5.0 compile error

Postby schnorr » Thu Jan 24, 2008 17:29

Hello,

I am trying to compile the layout editor 0.5.0 in Linux. I followed the tips available here http://www.cegui.org.uk/wiki/index.php/Getting_Started#Setup_the_editor.

So, I first installed wxWidgets-2.8.7.
Then, I configured the layout editor package with the following command:

./configure --with-wx-config=/opt/wx/lib/wx/config/gtk2-unicode-release-2.8


After make, the compilation follows, but stops with the following error:
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../inc -I../dependencies/iniFile -I/usr/lo
cal/include/CEGUI -I/opt/wx//lib/wx/include/gtk2-unicode-release-2.8 -I/opt/wx
//include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -DCLEDITOR_DA
TAPATH="\"/usr/local/share/CELayoutEditor/datafiles\"" -g -O2 -MT DialogAddWi
ndow.o -MD -MP -MF ".deps/DialogAddWindow.Tpo" -c -o DialogAddWindow.o DialogAdd
Window.cpp; \
then mv -f ".deps/DialogAddWindow.Tpo" ".deps/DialogAddWindow.Po"; else
rm -f ".deps/DialogAddWindow.Tpo"; exit 1; fi
DialogAddWindow.cpp: In member function ‘void DialogAddWindow::InitWidgetTree(co
nst CEGUI::Window*)’:
DialogAddWindow.cpp:165: error: no matching function for call to ‘wxTreeCtrl::Ge
tFirstChild(wxTreeItemId&, long int&)’
/opt/wx//include/wx-2.8/wx/generic/treectlg.h:120: note: candidates are: virtual
wxTreeItemId wxGenericTreeCtrl::GetFirstChild(const wxTreeItemId&, void*&) cons
t
DialogAddWindow.cpp:169: error: no matching function for call to ‘wxTreeCtrl::Ge
tFirstChild(wxTreeItemId&, long int&)’
/opt/wx//include/wx-2.8/wx/generic/treectlg.h:120: note: candidates are: virtual
wxTreeItemId wxGenericTreeCtrl::GetFirstChild(const wxTreeItemId&, void*&) cons
t
DialogAddWindow.cpp: In member function ‘void DialogAddWindow::OnSelchangedWidge
tTree(wxTreeEvent&)’:
DialogAddWindow.cpp:184: error: no matching function for call to ‘wxTreeCtrl::Ge
tFirstChild(wxTreeItemId&, long int&)’
/opt/wx//include/wx-2.8/wx/generic/treectlg.h:120: note: candidates are: virtual
wxTreeItemId wxGenericTreeCtrl::GetFirstChild(const wxTreeItemId&, void*&) cons
t
DialogAddWindow.cpp: In member function ‘void DialogAddWindow::OnOK(wxCommandEve
nt&)’:
DialogAddWindow.cpp:272: error: ‘OnOK’ is not a member of ‘wxDialog’
DialogAddWindow.cpp: In member function ‘void DialogAddWindow::OnCancel(wxComman
dEvent&)’:
DialogAddWindow.cpp:280: error: ‘OnCancel’ is not a member of ‘wxDialog’
make[2]: *** [DialogAddWindow.o] Error 1
make[2]: Leaving directory `/home/schnorr/tmp/CELayoutEditor-0.5.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/schnorr/tmp/CELayoutEditor-0.5.0'
make: *** [all] Error 2
schnorr@crowh:~/tmp/CELayoutEditor-0.5.0$


Does anyone know a solution for that?
the version 0.5.0 of the editor works with wxwidgets 2.8.7?

Thanks
Last edited by schnorr on Fri Jan 25, 2008 20:56, edited 1 time in total.

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

Postby CrazyEddie » Thu Jan 24, 2008 19:15

Hi,

I think, but am not in any way 100% certain, that you may need a newer version of the code to use 2.8.x of wxWidgets.

The newer editor code definitely works with 2.8.x, there's some details posted [url=http://www.cegui.org.uk/phpBB2/viewtopic.php?t=2839]here[/ul], though I think you need svn CEGUI code (though again, I'm not certain).

fjeronimo or maybe Scriptkid will likely have better info about which version work with what (I just use SVN versions of everything).

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Thu Jan 24, 2008 21:41

Hi,

i'm sorry, but the files in the download area pointed to 0.5.0, while we are already at 0.5c. I fixed this, can you try to download the file again from this page: http://www.cegui.org.uk/wiki/index.php/ ... oads_0.5.0

Please let me know when it still doesn't compile.

HTH.
Check out my released snake game using Cegui!

schnorr
Just popping in
Just popping in
Posts: 14
Joined: Fri Jan 11, 2008 09:39

Postby schnorr » Thu Jan 24, 2008 23:52

Hello,

Thanks for the replies. So, I downloaded 0.5.0c version. Here are some problems I found when dealing in Ubuntu Linux 7.10.

1/ bootstrap with DOS characters
schnorr@home:/tmp/CELayoutEditor$ ./bootstrap
-bash: ./bootstrap: /bin/sh^M: bad interpreter: No such file or directory
schnorr@home:/tmp/CELayoutEditor$

To make it work, execute the command inside the script:
aclocal -I . $ACLOCAL_FLAGS && autoheader && automake --include-deps --add-missing --foreign && autoconf

Maybe it is interesting to remove the DOS characters in the end of lines, but I don't know what is the impact to Windows users.

2/ configure problems when generating Makefiles
schnorr@home:/tmp/CELayoutEditor$ ./configure --with-wx-config=/opt/wx/lib/wx/config/gtk2-unicode-release-2.8
(...)
(...)
configure: creating ./config.status
.infig.status: error: cannot find input file: Makefile
schnorr@home:/tmp/CELayoutEditor$

The make it work, configure.ac (around line 66) changed from this:
AC_CONFIG_FILES([Makefile
bin/Makefile
src/Makefile])

to this
AC_CONFIG_FILES(Makefile bin/Makefile src/Makefile)

Now I have the makefiles.

I executed make and the error changed to this:
schnorr@home:/tmp/CELayoutEditor$ make
make all-recursive
make[1]: entrant dans le répertoire « /tmp/CELayoutEditor »
Making all in src
make[2]: entrant dans le répertoire « /tmp/CELayoutEditor/src »
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../inc -I../dependencies/iniFile -I/usr/local/include/CEGUI -I/opt/wx//lib/wx/include/gtk2-unicode-release-2.8 -I/opt/wx//include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -DCLEDITOR_DATAPATH="\"/usr/local/share/CELayoutEditor/datafiles\"" -g -O2 -MT EditorCanvas.o -MD -MP -MF ".deps/EditorCanvas.Tpo" -c -o EditorCanvas.o EditorCanvas.cpp; \
then mv -f ".deps/EditorCanvas.Tpo" ".deps/EditorCanvas.Po"; else rm -f ".deps/EditorCanvas.Tpo"; exit 1; fi
/opt/wx//include/wx-2.8/wx/defs.h:237: erreur: expected constructor, destructor, or type conversion before «typedef"
make[2]: *** [EditorCanvas.o] Erreur 1
make[2]: quittant le répertoire « /tmp/CELayoutEditor/src »
make[1]: *** [all-recursive] Erreur 1
make[1]: quittant le répertoire « /tmp/CELayoutEditor »
make: *** [all] Erreur 2
schnorr@home:/tmp/CELayoutEditor$

It seems an error with the wxWidgets library. The line 237 of the file has:
typedef short int WXTYPE;

So, any idea? :roll:

Thanks again,

thefreeman_za
Just popping in
Just popping in
Posts: 1
Joined: Fri Jan 25, 2008 20:09

Postby thefreeman_za » Fri Jan 25, 2008 20:18

It is actually not a wxWidgets problem but something strange in the EditorCanvas.cpp file in the src folder. The first couple of lines of EditorCanvas.cpp:

Code: Select all

a///////////////////////////////////////////////////////////////////////////////
//  For project details and authors, refer to "CELayoutEditor.cpp".
//
//  This file is free software; you can redistribute it and/or
//  modify it under the terms of the GNU General Public License
//  as published by the Free Software Foundation; either version 2
//  of the License, or (at your option) any later version.
//
//  This file is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//  GNU General Public License for more details.
//
//  You should have received a copy of the GNU General Public License
//  along with this program; if not, write to the Free Software
//  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
//
//  To view the licence online, go to: http://www.gnu.org/copyleft/gpl.html
////////////////////////////////////////////////////////////////////////////////

#include "pch.h"


In the first line of the file, the first character, the "a", should not be there. Remove it and it compiles fine.

schnorr
Just popping in
Just popping in
Posts: 14
Joined: Fri Jan 11, 2008 09:39

Postby schnorr » Fri Jan 25, 2008 21:00

Hello,

Thanks thefreeman_za.

Compilation problem solved by editing src/EditorCanvas.cpp of CELayoutEditor-0.5.0c and removing the "a" character placed as first character of the file.

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

Postby CrazyEddie » Tue Jan 29, 2008 10:05

Heh :)

I actually had this issue myself when I was performing some updates to get the newest code building on linux. I thought that I had inadvertently entered that 'a' myself - I did not realise that someone had committed code to svn like that :lol:

bencevoltam
Just popping in
Just popping in
Posts: 1
Joined: Sat May 03, 2008 15:10

Postby bencevoltam » Sun May 04, 2008 16:21

schnorr wrote:...
The make it work, configure.ac (around line 66) changed from this:
AC_CONFIG_FILES([Makefile
bin/Makefile
src/Makefile])

to this
AC_CONFIG_FILES(Makefile bin/Makefile src/Makefile)

Now I have the makefiles.
...


don't remove the brackets, it gives error (for me)

AC_CONFIG_FILES([Makefile bin/Makefile src/Makefile])


Return to “Help”

Who is online

Users browsing this forum: No registered users and 22 guests