Horde3D

Next-Generation Graphics Engine
It is currently 28.11.2024, 04:36

All times are UTC + 1 hour




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: 04.12.2009, 07:54 
Offline

Joined: 15.02.2009, 02:13
Posts: 161
Location: Sydney Australia
Hi,

I've recently pulled the latest community branch of horde3d+tools and tried opening Horde3DEditor.pro to build. I've set it up to build the Release profile which seems to build up to a point. Horde3D & Utils themselves compile fine using the editor's pro file and they also compile if I import the CMake file into QtCreator as well as the examples. I've pastebin'd what QtCreator pumped out from mingw, it complained about the Quaternions in GLWidget...

Pastebin:
http://pastebin.com/mca0914c

SVN Revision 328 from community branch

Windows XP 64-bit

QtCreator pack 2009.05 (32-bit)
-Qt 4.6
-MinGW 4.4.0 (I think it is this version?)

I'm guessing mingw is a lot more picky than msvc's compiler on this thing, or that I'm using a too modern Qt version? I don't know much C++ enough to fix this, I wanted to experiment with Horde3D's editor by writing some shaders first and export some collada models from maya for some experiments.

Thanks! I've got QtCreator 2009.04 to test as well so I'll try that next.

_________________
-Alex
Website


Top
 Profile  
Reply with quote  
PostPosted: 04.12.2009, 08:20 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
It seems like the trolls introduced a class QQuaternion in Qt 4.6. The same name is used by the editor in its own quaternion implementation. That's why it's not working with Qt 4.6 right know. But I will try to fix this, as soon as possible although I can't offer you a concrete date. Maybe in the next few hours or at least within the next few days.


Top
 Profile  
Reply with quote  
PostPosted: 04.12.2009, 08:24 
Offline

Joined: 15.02.2009, 02:13
Posts: 161
Location: Sydney Australia
Wow what a quick reply, thanks! Ah makes sense, so the name QQuaternion is conflicting with Qt4.6 and your own implementation?

I tried the 2009.04 pack with a lot more success except for when it gets up to lua here:

http://pastebin.com/m34b4198d

No rush on the Qt 4.6 name conflict I'm more than happy to use Qt 4.5.3, or just anything usable for that matter! :)

Thanks again
-Alex

_________________
-Alex
Website


Top
 Profile  
Reply with quote  
PostPosted: 04.12.2009, 09:46 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
Hm, the linker errors are a bit strange. It means, that the code compiled fine, but the linker couldn't find some of the methods that should be compiled before. I just did a clean checked out of the community branch and opened the HordeSceneEditor.pro file under trunk/Tools/Horde3DEditor with QtCreator under Ubuntu 9.10 and it worked fine out of the box.
So maybe the toolchain is some kind of broken with MinGW. Unfortunately I don't have a MinGW installation for testing. Maybe you could try to run
Code:
qmake Horde3DEditor.pro

in the trunk/Tools/Horde3DEditor folder from the command line without using QtCreator and run
Code:
make

afterwards. Perhaps QtCreator does not work as well as the command line tools.


Top
 Profile  
Reply with quote  
PostPosted: 06.12.2009, 07:39 
Offline

Joined: 15.02.2009, 02:13
Posts: 161
Location: Sydney Australia
Ok I've figured out the problem with the linker issues right at the end. It turns out that mingw or the qmake-generated make files makes the right dynamic libs for Lua, Horde3D and Horde3DUtils but it also makes small static libs of these so there's a few .a files in the lib directory. So when the linking stage happens it picks up these small .a files instead of the .dll's and fails. So when the make system failed I deleted the .a files and then continued the compile and it worked!

I can't seem to work out why it makes small static versions of these libs in addition to the proper dlls, from reading the .pro files so I can't find an obvious fix, but a dirty hack for now is to delete the .a files by hand.

This is with QtCreator 2009.04 with its corresponding mingw toolkit and Qt 4.5.3.

_________________
-Alex
Website


Top
 Profile  
Reply with quote  
PostPosted: 06.12.2009, 09:49 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
Thanks for sharing your fix. I never used MinGW, so I don't know what could be the reason for the .a libraries. Under MSVC the .lib files contains the exported symbols of the DLL to link against without dynamic loading of the DLL at runtime. Not sure if the MinGW compiler tries to create such libs too. If yes, it seems like they don't contain the symbols the should.

But good that you have solved the problem, although the workaround of course shouldn't be necessary.


Top
 Profile  
Reply with quote  
PostPosted: 06.12.2009, 12:29 
Offline

Joined: 21.08.2008, 11:44
Posts: 354
offtopic: IIRC .a files in MinGW/GCC are equal to the .lib files for MSVC. When you are going to dynamic link them you need both .lib and .dll in MSVC and same happens for MinGW, you need .a and .dll.

I'm not sure but i think it will be a combo of .a and .so for linux. So .a files are not junk and they should be linked in MinGW/GCC like .lib in MSVC.

please correct me if im wrong somewhere


Top
 Profile  
Reply with quote  
PostPosted: 06.12.2009, 14:23 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
Siavash wrote:
offtopic: IIRC .a files in MinGW/GCC are equal to the .lib files for MSVC. When you are going to dynamic link them you need both .lib and .dll in MSVC and same happens for MinGW, you need .a and .dll.

I'm not sure but i think it will be a combo of .a and .so for linux. So .a files are not junk and they should be linked in MinGW/GCC like .lib in MSVC.

please correct me if im wrong somewhere
Nope - Under MinGW/Cygwin/Linux/Mac the .a files are static libraries, only used for static linking, while the .dll/,so/.dylib are the dynamic libraries, and don't require any extra files to link.

MSVC has a very strange linker model by comparison ;)

_________________
Tristam MacDonald - [swiftcoding]


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group