Can't compile, errors out every single time

Discuss the future of Warzone 2100 with us.
Post Reply
Ryaniskira1
New user
Posts: 1
Joined: 10 May 2015, 04:03

Can't compile, errors out every single time

Post by Ryaniskira1 »

Code: Select all

ar_moc.cpp:13:2: error: #error "This file was generated using the moc from 4.8.6. It"
 #error "This file was generated using the moc from 4.8.6. It"
  ^
bar_moc.cpp:14:2: error: #error "cannot be used with the include files from this version of Qt."
 #error "cannot be used with the include files from this version of Qt."
  ^
bar_moc.cpp:15:2: error: #error "(The moc has changed too much.)"
 #error "(The moc has changed too much.)"
  ^
bar_moc.cpp:47:7: error: ‘QMetaObjectExtraData’ does not name a type
 const QMetaObjectExtraData W_BARGRAPH::staticMetaObjectExtraData = {
       ^
bar_moc.cpp:53:33: error: ‘staticMetaObjectExtraData’ was not declared in this scope
       qt_meta_data_W_BARGRAPH, &staticMetaObjectExtraData }
                                 ^
bar_moc.cpp: In member function ‘virtual const QMetaObject* W_BARGRAPH::metaObject() const’:
bar_moc.cpp:62:71: error: conditional expression between distinct pointer types ‘QDynamicMetaObjectData*’ and ‘const QMetaObject*’ lacks a cast
     return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
                                                                       ^
bar_moc.cpp:63:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
cc1plus: all warnings being treated as errors
Makefile:494: recipe for target 'bar_moc.o' failed
make[2]: *** [bar_moc.o] Error 1
make[2]: Leaving directory '/home/kira/GIT/WZ2100/warzone2100/lib/widget'
Makefile:575: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/kira/GIT/WZ2100/warzone2100'
Makefile:494: recipe for target 'all' failed
make: *** [all] Error 2
kira@Stargate-Command:~/GIT/WZ2100/warzone2100$ 
Ubuntu 15.04 and I have all the deps installed
User avatar
vexed
Inactive
Inactive
Posts: 2538
Joined: 27 Jul 2010, 02:07

Re: Can't compile, errors out every single time

Post by vexed »

What version you trying to compile? If this is master, then, we require Qt 5.x.
/facepalm ...Grinch stole Warzone🙈🙉🙊 contra principia negantem non est disputandum
Super busy, don't expect a timely reply back.
throndjohnson
New user
Posts: 3
Joined: 26 Nov 2015, 18:24

Re: Can't compile, errors out every single time

Post by throndjohnson »

vexed wrote:What version you trying to compile? If this is master, then, we require Qt 5.x.
I have exactly the same compile errors as above, and I have Qt 5.5.1
User avatar
vexed
Inactive
Inactive
Posts: 2538
Joined: 27 Jul 2010, 02:07

Re: Can't compile, errors out every single time

Post by vexed »

throndjohnson wrote:
vexed wrote:What version you trying to compile? If this is master, then, we require Qt 5.x.
I have exactly the same compile errors as above, and I have Qt 5.5.1
I ask the same as I did above, what version are you trying to compile?

The other guy, it clearly shows what the issue is... #error "This file was generated using the moc from 4.8.6.

What OS are you using as well?
/facepalm ...Grinch stole Warzone🙈🙉🙊 contra principia negantem non est disputandum
Super busy, don't expect a timely reply back.
throndjohnson
New user
Posts: 3
Joined: 26 Nov 2015, 18:24

Re: Can't compile, errors out every single time

Post by throndjohnson »

vexed wrote:
throndjohnson wrote:
vexed wrote:What version you trying to compile? If this is master, then, we require Qt 5.x.
I have exactly the same compile errors as above, and I have Qt 5.5.1
I ask the same as I did above, what version are you trying to compile?

The other guy, it clearly shows what the issue is... #error "This file was generated using the moc from 4.8.6.

What OS are you using as well?
I am trying to compile the current master. I don't know if the compile errors are reporting the correct version of moc. All I did was starting from a fresh install of Mint 17.2. I downloaded and installed the latest version of Qt from their website (5.5.1) community version. Then I followed the instructions on http://developer.wz2100.net/wiki/CompileGuideLinux. By the way - it would be nice if someone could please update the "sudo apt-get install..." to use the current version of Qt (it still has "libqt4-opengl-dev libqt4-network"). Then my compile failed with the errors mentioned by Ryaniskira1. Is there something I need to do to configure my version of Qt for the moc to not put up these errors? Thanks for the help.
throndjohnson
New user
Posts: 3
Joined: 26 Nov 2015, 18:24

Re: Can't compile, errors out every single time

Post by throndjohnson »

I got it to compile after a lot of trial and error - yay! I believe the trick that got this fixed for me was installing qt5-default (sudo apt-get install qt5-default). This tells the system to use Qt 5 for development by default. So in case you already have some older version of Qt installed, it should use the version we want to use. Now I would like to help with development - starting with bug fixes. I love warzone!
User avatar
vexed
Inactive
Inactive
Posts: 2538
Joined: 27 Jul 2010, 02:07

Re: Can't compile, errors out every single time

Post by vexed »

Hey, sorry for the delay in getting back to you, wasn't around.
Anyway, yeah, there are different ways to switch between Qt 5 & Qt4, with most distros having qt4 by default.
Actually pretty messy IMO.
Anyway, about the wiki, anyone can edit it, please feel free to fix any errors.
As for wanting to help, cool! :) This should get you started: viewtopic.php?f=1&t=11570

If you have any other questions, let us know. :3
/facepalm ...Grinch stole Warzone🙈🙉🙊 contra principia negantem non est disputandum
Super busy, don't expect a timely reply back.
Post Reply