mygui compiling ubuntu 64bit

qwertzui11

23-08-2011 21:01:56

Hi

there were several errors when i was compiling for ubuntu 11.04 64bit with the latest rev;
here's the correction:
Index: Plugins/Plugin_BerkeliumWidget/Buffer.h
===================================================================
--- Plugins/Plugin_BerkeliumWidget/Buffer.h (revision 4306)
+++ Plugins/Plugin_BerkeliumWidget/Buffer.h (working copy)
@@ -6,6 +6,10 @@
#ifndef __BUFFER_H__
#define __BUFFER_H__

+#include <stdio.h>
+#include <string.h>
+#include <complex>
+
namespace helpers
{
class Buffer
Index: Common/Input/InputConverter.h
===================================================================
--- Common/Input/InputConverter.h (revision 4306)
+++ Common/Input/InputConverter.h (working copy)
@@ -993,14 +993,14 @@
#undef ADD_MAP
#undef ADD_MAP2
}
-
+#if MYGUI_PLATFORM == MYGUI_PLATFORM_WIN32
int VirtualKeyToScanCode(WPARAM _virtualKey) const
{
if (_virtualKey < VLK_MAX)
return (int)mVirtualKeyToScanCode[_virtualKey];
return 0;
}
-
+#endif
int ScanCodeToVirtualKey(int _scanCode) const
{
if (_scanCode < SC_MAX)
@@ -1040,12 +1040,13 @@
static Table table;
return table;
}
-
+#if MYGUI_PLATFORM == MYGUI_PLATFORM_WIN32
int VirtualKeyToScanCode(WPARAM _virtualKey)
{
const Table& table = getTable();
return table.VirtualKeyToScanCode(_virtualKey);
}
+#endif

int ScanCodeToVirtualKey(int _scanCode)
{


Next error is, that in MyGui all Ogre-Headers get included with
#include "Ogre*.h"
instead of
#include "OGRE/Ogre*.h"
and that everytime boost/thread/tss.hpp is missing. U have to copy these files to the OgreIncludeDir, maybe an entry at the cmake-file would be cool which links to the boost-Include-Dir

Howevery great job, all works berkeliumPlugin too :D

Is there a chance to become LinuxMaintainer? :D

Have fun
Markus

Altren

24-08-2011 09:45:16

Well, while I agree with changes in Common/Input/InputConverter.h I disagree with other changer.
Most or all headers you included in Plugin_BerkeliumWidget/Buffer.h are not required there. I guess they might be required in other files, that include Buffer.h, so you should include them only there.

What about "Ogre*.h" and "OGRE/Ogre*.h" - it won't work with older Ogre versions and in some other cases, so you should consider changing CMake files instead of changing sources.

And about boost headers - well, CMake usually can handle this. May be some additional changes are required there as well, but copying headers is definitely not a good idea.

Is there a chance to become LinuxMaintainer? :DYes, there is. But you should keep in mind that code works on various platforms, so you can't fix it for Linux and break for Windows or Mac or something else.