QxOrm project structure + MinGW

Open discussion on QxOrm library

QxOrm project structure + MinGW

Postby ukindler » Tue Nov 16, 2010 1:24 pm

Hi Lionel,

regarding my try to build QxOrm with MinGW I proposed to change the build structure of QxOrm to make it easier to maintain. Now I managed to build QxOrm with MinGW and restructured the build system of QxOrm. I uploaded my proposal here: http://www.cetoni.de/QxOrm_MinGW.zip.

I used the same build layout like Qt or QtCreator. That means there is no separation between source and headers. Each supdirectory contains a *.pri file with all sources and headers and includes the pri files of the sub directories. Then I changed the included paths in all files. Because I added the main src folder as include folder I can use include paths relative to this include folder. So instead of writing includes like #include "../../../include/QxSerialize/boost/QxSerializeInclude.h" it is now possible to write #include "QxSerialize/boost/QxSerializeInclude.h".

When I compiled QxOrm I stumbled across another problem. I use boost 1.43 and the build process of QxOrm failed because of a lot of compiler errors of this kind:
include/QxSerialize/Qt/QxSerialize_QPoint.h:42: error: conflicting declaration 'mpl_assertion_in_line_42'
include/QxSerialize/Qt/QxSerialize_QColor.h:42: error: 'mpl_assertion_in_line_42' has a previous declaration as '<anonymous enum> mpl_assertion_in_line_42'

I googled a little bit and found that this is a bug in BOOST_CLASS_VERSION macro in boost 1.43:

http://permalink.gmane.org/gmane.comp.lib.boost.user/59865

So you should use another boost version or replace the version.hpp file in boost/serialization folder with a new version from boost trunk where this problem is fixed.

After these changes and after I fixed the boost 1.43 issue I could sucessfully compile QxOrm with MinGW 4.4.0.

I have not run the test cases yet so I cant't confirm the functionality but at least I can compile QxOrm now.

What do you thing about the proposed QxOrm build structure?

Uwe
ukindler
 

Re: QxOrm project structure + MinGW

Postby QxOrm admin » Tue Nov 16, 2010 9:41 pm

Hi,

Thank you very much for your upload :)
I think I will restructure QxOrm.pro file with many *.pri files (1 .pri by sub-folder) in the next release (QxOrm 1.1.4)...

Today, I prefer that there is a separation between headers (include folder), sources (src folder) and template implementation (inl folder).
This is certainly due to my editor and environment : I work with Visual Studio on Windows.

With your modified version of QxOrm, I think you will have a problem with singleton and dll. This is due to a problem with MinGW to export/import template instanciation in shared libraries.

I just release QxOrm 1.1.3 : you can try this version.
I have tested with MinGW GCC 4.5.1 and QxOrm builds and works fine.

You can send me all patches or new functionalities you want... :)
This is very insteresting, thank you.
QxOrm admin
 


Return to QxOrm - Open discussion

Who is online

Users browsing this forum: No registered users and 16 guests