ayoub05 / vdrift-ogre

Automatically exported from code.google.com/p/vdrift-ogre
0 stars 0 forks source link

Compatibility with MyGUI 3.2.x #38

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I read in the Freegamer blog[1] that this project compiles on Linux, so I gave 
it a try:

> What steps will reproduce the problem?

1. try to compile it (under Linux)

> What version are you using? On what operating system?

from the hg repo, just checked out, on Debian Sid.

> Please provide any additional information below.

relevant compile output:

Linking CXX executable ../stuntrally                                            

In file included from 
/home/mdione/src/system/games/vdrift-ogre/source/editor/Gui_Events.cpp:2:0:     

/home/mdione/src/system/games/vdrift-ogre/source/editor/OgreApp.h:254:15: 
error: ‘Message’ has not been declared
/home/mdione/src/system/games/vdrift-ogre/source/editor/OgreApp.h:254:32: 
error: ‘MessageBoxStyle’ has not been declared
[...]
In file included from 
/home/mdione/src/system/games/vdrift-ogre/source/editor/OgreApp.cpp:2:0:
/home/mdione/src/system/games/vdrift-ogre/source/editor/OgreApp.h:254:15: 
error: ‘Message’ has not been declared
/home/mdione/src/system/games/vdrift-ogre/source/editor/OgreApp.h:254:32: 
error: ‘MessageBoxStyle’ has not been declared
make[2]: *** [source/CMakeFiles/sr-editor.dir/editor/Gui_Events.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/usr/bin/ld: CMakeFiles/stuntrally.dir/ogre/QTimer.cpp.o: undefined reference 
to symbol 'clock_gettime@@GLIBC_2.2'
/usr/bin/ld: note: 'clock_gettime@@GLIBC_2.2' is defined in DSO 
//lib/librt.so.1 so try adding it to the linker command line
//lib/librt.so.1: could not read symbols: Invalid operation
collect2: ld returned 1 exit status

    I'm not sure if the linking problem it's relevant, or if it is another issue altogether, and whether it's a local problem or not.

    More info:

libogre-dev                          1.7.1-1
libois-dev                           1.2.0-2
my-gui                               from svn repo, checked out today

--
[1] http://freegamer.blogspot.com/2011/04/stunt-rally-11.html

Original issue reported on code.google.com by mr.styx...@gmail.com on 4 Apr 2011 at 11:29

GoogleCodeExporter commented 9 years ago
Please try to add MyGUI:: before Message and MessageBoxStyle. We used MyGUI 
v3.0.1, don't know about svn maybe it's different now.
As for the gettime looks like a missing library in linker for me, but wait for 
Linux developers they should know more.

Original comment by Cry...@gmail.com on 4 Apr 2011 at 11:44

GoogleCodeExporter commented 9 years ago
As far as I see from the log, the game compiled successfully, only editor has a 
problem. So you could play the game, if that matters.

Maybe you have an old version of MyGUI still installed and the headers from 
these versions are used? Recent MyGUI version should definitely have Message 
and MessageBoxStyle.

Original comment by scrawl...@gmail.com on 4 Apr 2011 at 11:49

GoogleCodeExporter commented 9 years ago
I have had similar error with the Message stuff. It was caused by multiple 
MyGUI installations, so I suggest you purge your MyGUI and then reinstall a new 
version.

As for the librt, I added it to CMake for passing to linker, so it should work 
now (update hg).

Original comment by tapiovie...@gmail.com on 4 Apr 2011 at 12:22

GoogleCodeExporter commented 9 years ago
* adding MyGUI:: doesn't help, I get a similar error. I will try to compile 
MyGUI 3.0.1 and see what happens.

* the game didn't have compiled yet, but now it did (I use make -j 3 to make 
cmake spawn several parallel compilations, so I get a bit of progress each 
time) and I got several tens of linking problems:

Linking CXX executable ../stuntrally                                            

CMakeFiles/stuntrally.dir/ogre/Gui_Events.cpp.o: In function 
`App::slAnisotropy(MyGUI::Widget*, unsigned int)':                              

/home/mdione/src/system/games/vdrift-ogre/source/ogre/Gui_Events.cpp:30: 
undefined reference to `MyGUI::UString::UString(std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&)'

* I only have MyGUI installed from sources, Debian Sid has no packages for it 
(yet?) and I only installed the one I compiled this morning.

Original comment by mr.styx...@gmail.com on 4 Apr 2011 at 3:17

GoogleCodeExporter commented 9 years ago
ok, it compiles with MyGUI 3.0.1 from the .zip release, but I still get the 
link problem. I think it's something local. I will keep looking into it.

Original comment by mr.styx...@gmail.com on 4 Apr 2011 at 3:43

GoogleCodeExporter commented 9 years ago
ok, it was local, but because I tried (and failed) to fix this:

-- checking for one of the modules 'MYGUI;MyGUI'
CMake Warning (dev) at CMakeLists.txt:52 (link_directories):
  This command specifies the relative path

    MYGUI_LIBRARIES-NOTFOUND

  as a link directory.

  Policy CMP0015 is not set: link_directories() treats paths relative to the
  source dir.  Run "cmake --help-policy CMP0015" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.

I used cmake -i to edit the results of cmake's findings, but evidently I 
wronged the answer for MYGUI_LIBRARIES. I put -lMyGUIEngine and it linked. 
still, the cmake test is not working, at least here.

Original comment by mr.styx...@gmail.com on 4 Apr 2011 at 3:55

GoogleCodeExporter commented 9 years ago
a comment about my last statement: «the cmake test is not working, at least 
here». I configured ogre, MyGUI and vdrift-ogre to install in $HOME/local. the 
cmake test finds MyGUI's headers, but not the libraries. at least it finds fine 
the local ogre instalation.

Original comment by mr.styx...@gmail.com on 4 Apr 2011 at 5:06

GoogleCodeExporter commented 9 years ago
Where did you install MyGUI originally? I have it in /usr/local and it is found 
fine. When tinkering with multiple versions and multiple install prefixes, be 
sure to delete all the previous files, including 
/usr/[local/]lib/pkgconfig/MYGUI.pc, which might point to wrong installation. 
Also, if you installing to $HOME/local you might need some manual tweaking as I 
don't know if pkg-config can find the .pc from there (for obscure install 
prefixes, you may need to set MYGUI_INCLUDE_DIRS, MYGUI_LIB_DIR and 
MYGUI_LIBRARIES manually, e.g. by using ccmake).

In addition, I run some tests and can confirm the (original bug report) errors 
happen with svn MyGUI - stuntrally seems to require 3.0.x.

Original comment by tapiovie...@gmail.com on 4 Apr 2011 at 10:05

GoogleCodeExporter commented 9 years ago
I'm fairly sure that your cmake problems are caused by old MyGUI files and 
unusual prefixes as I described in the previous post (feel free to contest me 
though), so I'm retitling this to better describe what caused the original 
errors. I'm also lowering the priority, since MyGUI 3.0.x is still the stable 
series where compatibility must be kept, so it should be investigated if 3.2.x 
can be made work while keeping 3.0.x valid.

Original comment by tapiovie...@gmail.com on 4 Apr 2011 at 10:15

GoogleCodeExporter commented 9 years ago
From this topic: http://www.ogre3d.org/addonforums/viewtopic.php?f=17&t=13936 
it becames obvious that the changes in MyGUI 3.2 involve:

- Message moved from Core to Common.

So from my understanding, it should be enough to include MyGUI_Common.h .

Original comment by scrawl...@gmail.com on 5 Apr 2011 at 9:08

GoogleCodeExporter commented 9 years ago
Here is another thread that describes migration from 3.0 to 3.2: 
http://www.ogre3d.org/addonforums/viewtopic.php?f=17&t=13725

Also, I was wrong that we only need to include the header. It was removed from 
core, so the header has to be copied from  [MyGUI_sources]/Common and included 
with #include "MessageBox.h"

Original comment by scrawl...@gmail.com on 5 Apr 2011 at 9:13

GoogleCodeExporter commented 9 years ago
I investigated a little and found out there will be a lot to change:
 - MessageBox and other headers that are not in MyGUI core will have to be shipped with the source
 - MessageBox resources have to be added to data repo
 - MessageBoxResources.xml has to be loaded at GUI initialization
 - VectorWidgetPtr& -> VectorWidgetPtr in editor/Gui_Init.cpp:17 (not sure if this would also work with 3.0.x)
 - MyGUI::Widget::setCaption does not exist anymore. So in editor/Gui_Init.cpp, the widgets (for road stats etc) would have to be casted to TextBoxPtr somehow.

Also, there might be even more problems, as I was stuck at the 
Widget::setCaption issue. In my opinion this is too much work so it's not a 
priority now. When 3.2 stable is released, we can investigate this again.

Original comment by scrawl...@gmail.com on 5 Apr 2011 at 9:44

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

Original comment by scrawl...@gmail.com on 8 Apr 2011 at 11:48

GoogleCodeExporter commented 9 years ago
Issue 64 has been merged into this issue.

Original comment by tapiovie...@gmail.com on 16 Apr 2011 at 11:36

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
work started by svenstaro (i don't know if he has an account here)

Original comment by scrawl...@gmail.com on 16 Oct 2011 at 8:27

GoogleCodeExporter commented 9 years ago
Looks like svenstaro gave up so I'm taking this now.

Also upping priority since it's needed for D3D11.

Original comment by scrawl...@gmail.com on 9 Nov 2011 at 5:10

GoogleCodeExporter commented 9 years ago
Status update: both game and editor compile and run now with mygui 3.2. 2 
issues are left:

- Widgets do not resize with bigger window size (seems to be a bit tricky, 
since there is no Align::Relative anymore)
- Slider events are not fired (this means it is impossible to change most of 
the settings in gui)

Original comment by scrawl...@gmail.com on 9 Nov 2011 at 8:27

GoogleCodeExporter commented 9 years ago
I didn't exactly give up but uni happened. Sorry, I probably should have told 
you.

Original comment by svenst...@gmail.com on 9 Nov 2011 at 8:42

GoogleCodeExporter commented 9 years ago
problem 2 solved (slider events are not fired)

Original comment by scrawl...@gmail.com on 10 Nov 2011 at 10:54

GoogleCodeExporter commented 9 years ago
After a lot of trouble with sizing and layouts, support for mygui 3.2 is now 
ready in master. Note that support for 3.0 has been abandoned, so you need 
mygui 3.2+ now to compile game and editor.

If there are still problems, please open a seperate issue.

Original comment by scrawl...@gmail.com on 16 Nov 2011 at 6:32