QxOrm build error on mac

Forum for posting problems using QxOrm library

QxOrm build error on mac

Postby jolo » Wed Feb 23, 2011 1:30 pm

Hello,

Software versions:

Qt: 4.7.0
boost: 1.45
gcc: 4.0.1

I get the following build error on mac when building QxOrm with qmake -spec macx-g++ && make debug - what to do?:

thank you!

include/QxTraits/get_base_class.h:42: warning: ‘class qx::trait::no_base_class_defined’ has virtual functions but non-virtual destructor
g++ -c -include debug/QxOrmd -pipe -g -gdwarf-2 -Wall -W -fPIC -D_QX_BUILDING_QX_ORM -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers -I/usr/include/QtNetwork -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/Library/Frameworks/QtXml.framework/Versions/4/Headers -I/usr/include/QtXml -I/Library/Frameworks/QtSql.framework/Versions/4/Headers -I/usr/include/QtSql -I/usr/include -I../boost/include -Iinclude -Iqt/moc -F/Library/Frameworks -o debug/IxDataMember.o src/QxDataMember/IxDataMember.cpp
include/QxTraits/get_base_class.h:42: warning: ‘class qx::trait::no_base_class_defined’ has virtual functions but non-virtual destructor
include/QxTraits/archive_wide_traits.h: In static member function ‘static QString qx::trait::archive_wide_traits<T>::toQString(const typename boost::mpl::if_c<qx::trait::archive_wide_traits<T>::is_wide, std::wstring, std::string>::type&)’:
include/QxTraits/archive_wide_traits.h:87: error: ‘::toQString’ has not been declared
include/QxTraits/archive_wide_traits.h: In static member function ‘static typename boost::mpl::if_c<qx::trait::archive_wide_traits<T>::is_wide, std::wstring, std::string>::type qx::trait::archive_wide_traits<T>::fromQString(const QString&)’:
include/QxTraits/archive_wide_traits.h:88: error: ‘::fromQString’ has not been declared
include/QxTraits/construct_ptr.h: In static member function ‘static void qx::trait::construct_ptr<T>::get(T&)’:
include/QxTraits/construct_ptr.h:61: error: ‘::get’ has not been declared
include/QxCommon/QxStringCvt_Impl.h: In static member function ‘static QVariant qx::cvt::detail::QxStringCvtGeneric<T>::toVariant(const T&, const QString&, int)’:
include/QxCommon/QxStringCvt_Impl.h:105: error: ‘::toVariant’ has not been declared
include/QxCommon/QxStringCvt_Impl.h: In static member function ‘static qx_bool qx::cvt::detail::QxStringCvtGeneric<T>::fromVariant(const QVariant&, T&, const QString&, int)’:
include/QxCommon/QxStringCvt_Impl.h:108: error: ‘::fromVariant’ has not been declared
include/QxTraits/archive_wide_traits.h: In static member function ‘static QString qx::trait::archive_wide_traits<T>::toQString(const typename boost::mpl::if_c<qx::trait::archive_wide_traits<T>::is_wide, std::wstring, std::string>::type&) [with T = boost::archive::xml_oarchive]’:
include/QxSerialize/../../inl/QxSerialize/QxArchive.inl:163: instantiated from ‘static QString qx::QxArchive<T, ArchiveInput, ArchiveOutput>::toString(const T&, unsigned int) [with T = QBrush, ArchiveInput = boost::archive::xml_iarchive, ArchiveOutput = boost::archive::xml_oarchive]’
include/QxSerialize/QxArchive.h:114: instantiated from ‘QString qx::serialization::xml::to_string(const T&, unsigned int) [with T = QBrush]’
include/QxCommon/../../inl/QxCommon/QxStringCvt_Qt.inl:36: instantiated from here
include/QxTraits/archive_wide_traits.h:87: error: dependent-name ‘qx::trait::archive_wide_traits<T>::cvtQString’ is parsed as a non-type, but instantiation yields a type
include/QxTraits/archive_wide_traits.h:87: note: say ‘typename qx::trait::archive_wide_traits<T>::cvtQString’ if a type is meant
include/QxTraits/archive_wide_traits.h: At global scope:
include/QxTraits/archive_wide_traits.h:87: warning: unused parameter ‘str’
include/QxTraits/archive_wide_traits.h: In static member function ‘static typename boost::mpl::if_c<qx::trait::archive_wide_traits<T>::is_wide, std::wstring, std::string>::type qx::trait::archive_wide_traits<T>::fromQString(const QString&) [with T = boost::archive::xml_iarchive]’:
include/QxSerialize/../../inl/QxSerialize/QxArchive.inl:174: instantiated from ‘static qx_bool qx::QxArchive<T, ArchiveInput, ArchiveOutput>::fromString(T&, const QString&, unsigned int) [with T = QBrush, ArchiveInput = boost::archive::xml_iarchive, ArchiveOutput = boost::archive::xml_oarchive]’
include/QxSerialize/QxArchive.h:114: instantiated from ‘qx_bool qx::serialization::xml::from_string(T&, const QString&, unsigned int) [with T = QBrush]’
include/QxCommon/../../inl/QxCommon/QxStringCvt_Qt.inl:36: instantiated from here
include/QxTraits/archive_wide_traits.h:88: error: dependent-name ‘qx::trait::archive_wide_traits<T>::cvtQString’ is parsed as a non-type, but instantiation yields a type
include/QxTraits/archive_wide_traits.h:88: note: say ‘typename qx::trait::archive_wide_traits<T>::cvtQString’ if a type is meant
make[1]: *** [debug/IxDataMember.o] Error 1
make: *** [debug] Error 2
jolo
 

Re: QxOrm build error on mac

Postby QxOrm admin » Wed Feb 23, 2011 5:21 pm

Hi,

It is very interesting, I have never tested QxOrm on Mac :)
On Linux, QxOrm works fine with GCC from version 4.4.1 (I have not tested with an anterior version).
Try to install a new version of GCC on your MAC if possible...

Then, if all tests from directory './test/' work fine, can you post a message to confirm that QxOrm works fine on MAC please ?
Thanks very much.
QxOrm admin
 

Re: QxOrm build error on mac

Postby Guest » Thu Feb 24, 2011 9:38 am

Hi,

unfortunately using gcc-4.2 doesn't help:

/usr/bin/g++-4.2 -c -include debug/QxOrmd -pipe -g -gdwarf-2 -Wall -W -fPIC -D_QX_BUILDING_QX_ORM -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers -I/usr/include/QtNetwork -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/Library/Frameworks/QtXml.framework/Versions/4/Headers -I/usr/include/QtXml -I/Library/Frameworks/QtSql.framework/Versions/4/Headers -I/usr/include/QtSql -I/usr/include -Iinclude -I../boost/include -Iqt/moc -F/Library/Frameworks -o debug/IxDataMember.o src/QxDataMember/IxDataMember.cpp
In file included from include/QxSerialize/QxArchive.h:43,
from include/QxSerialize/QxSerialize.h:122,
from src/QxDataMember/IxDataMember.cpp:32:
include/QxTraits/archive_wide_traits.h: In static member function ‘static QString qx::trait::archive_wide_traits<T>::toQString(const typename boost::mpl::if_c<qx::trait::archive_wide_traits<T>::is_wide, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::type&)’:
include/QxTraits/archive_wide_traits.h:87: error: ‘::toQString’ has not been declared
include/QxTraits/archive_wide_traits.h: In static member function ‘static typename boost::mpl::if_c<qx::trait::archive_wide_traits<T>::is_wide, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::type qx::trait::archive_wide_traits<T>::fromQString(const QString&)’:
include/QxTraits/archive_wide_traits.h:88: error: ‘::fromQString’ has not been declared
In file included from include/QxTraits/generic_container.h:38,
from include/QxDao/QxSqlRelation.h:44,
from include/QxDataMember/QxDataMemberX.h:38,
from include/QxRegister/QxClass.h:40,
from include/QxSerialize/QxArchive.h:50,
from include/QxSerialize/QxSerialize.h:122,
from src/QxDataMember/IxDataMember.cpp:32:
include/QxTraits/construct_ptr.h: In static member function ‘static void qx::trait::construct_ptr<T>::get(T&)’:
include/QxTraits/construct_ptr.h:61: error: ‘::get’ has not been declared
In file included from src/QxDataMember/IxDataMember.cpp:34:
include/QxCommon/QxStringCvt_Impl.h: In static member function ‘static QVariant qx::cvt::detail::QxStringCvtGeneric<T>::toVariant(const T&, const QString&, int)’:
include/QxCommon/QxStringCvt_Impl.h:105: error: ‘::toVariant’ has not been declared
include/QxCommon/QxStringCvt_Impl.h: In static member function ‘static qx_bool qx::cvt::detail::QxStringCvtGeneric<T>::fromVariant(const QVariant&, T&, const QString&, int)’:
include/QxCommon/QxStringCvt_Impl.h:108: error: ‘::fromVariant’ has not been declared
include/QxTraits/archive_wide_traits.h: In static member function ‘static QString qx::trait::archive_wide_traits<T>::toQString(const typename boost::mpl::if_c<qx::trait::archive_wide_traits<T>::is_wide, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::type&) [with T = boost::archive::xml_oarchive]’:
include/QxSerialize/../../inl/QxSerialize/QxArchive.inl:163: instantiated from ‘static QString qx::QxArchive<T, ArchiveInput, ArchiveOutput>::toString(const T&, unsigned int) [with T = QBrush, ArchiveInput = boost::archive::xml_iarchive, ArchiveOutput = boost::archive::xml_oarchive]’
include/QxSerialize/QxArchive.h:114: instantiated from ‘QString qx::serialization::xml::to_string(const T&, unsigned int) [with T = QBrush]’
include/QxCommon/../../inl/QxCommon/QxStringCvt_Qt.inl:36: instantiated from here
include/QxTraits/archive_wide_traits.h:87: error: dependent-name ‘qx::trait::archive_wide_traits<T>::cvtQString’ is parsed as a non-type, but instantiation yields a type
include/QxTraits/archive_wide_traits.h:87: note: say ‘typename qx::trait::archive_wide_traits<T>::cvtQString’ if a type is meant
include/QxTraits/archive_wide_traits.h: At global scope:
include/QxTraits/archive_wide_traits.h:87: warning: unused parameter ‘str’
include/QxTraits/archive_wide_traits.h: In static member function ‘static typename boost::mpl::if_c<qx::trait::archive_wide_traits<T>::is_wide, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::type qx::trait::archive_wide_traits<T>::fromQString(const QString&) [with T = boost::archive::xml_iarchive]’:
include/QxSerialize/../../inl/QxSerialize/QxArchive.inl:174: instantiated from ‘static qx_bool qx::QxArchive<T, ArchiveInput, ArchiveOutput>::fromString(T&, const QString&, unsigned int) [with T = QBrush, ArchiveInput = boost::archive::xml_iarchive, ArchiveOutput = boost::archive::xml_oarchive]’
include/QxSerialize/QxArchive.h:114: instantiated from ‘qx_bool qx::serialization::xml::from_string(T&, const QString&, unsigned int) [with T = QBrush]’
include/QxCommon/../../inl/QxCommon/QxStringCvt_Qt.inl:36: instantiated from here
include/QxTraits/archive_wide_traits.h:88: error: dependent-name ‘qx::trait::archive_wide_traits<T>::cvtQString’ is parsed as a non-type, but instantiation yields a type
include/QxTraits/archive_wide_traits.h:88: note: say ‘typename qx::trait::archive_wide_traits<T>::cvtQString’ if a type is meant
make[1]: *** [debug/IxDataMember.o] Error 1
make: *** [debug] Error 2
Guest
 

Re: QxOrm build error on mac

Postby QxOrm admin » Thu Feb 24, 2011 1:35 pm

Is gcc 4.2 the last version available for mac ?

It seems with your error msg that the compiler doesn't support correctly template source code.
I have no mac to test it, so I will try to install gcc 4.2 on Linux to test if I have same builds errors...
QxOrm admin
 

Re: QxOrm build error on mac

Postby Guest » Thu Feb 24, 2011 6:13 pm

QxOrm admin wrote:Is gcc 4.2 the last version available for mac ?

It seems with your error msg that the compiler doesn't support correctly template source code.
I have no mac to test it, so I will try to install gcc 4.2 on Linux to test if I have same builds errors...


it seems so. xcode 4.0 will bring newer compilers, but the download site was offline today... Will check back over the weekend.

How was the Linux test?
Guest
 

Re: QxOrm build error on mac

Postby QxOrm admin » Thu Feb 24, 2011 7:15 pm

I don't have a lot of time to test it.
I will try to test on Linux with GCC 4.2 this week-end...
QxOrm admin
 

Re: QxOrm build error on mac

Postby QxOrm admin » Sun Feb 27, 2011 5:21 pm

Hi,

I have same build errors with gcc 4.1 on Linux.
You have to modify 4 files to build QxOrm with this version of gcc.
The fix is the same for the 4 files to modify and is very easy :

For example, in file "./include/QxTraits/archive_wide_traits.h", replace :
qx::trait::archive_wide_traits<T>::cvtQString<is_wide, 0>::toQString(str);
by :
cvtQString<is_wide, 0>::toQString(str);

You need to remove the indirection (I think it is a bug with this gcc version).
It is the same thing for the followings files :
"./include/QxTraits/archive_wide_traits.h"
"./include/QxTraits/construct_ptr.h"
"./include/QxCommon/QxStringCvt_Impl.h"
"./inl/QxDao/QxDao_Trigger.inl"


If it changes nothing to build with msvc 2008, msvc 2010 and gcc > 4.4.1, I will apply this modif on the next release of QxOrm (QxOrm 1.1.5 will be released in few days)...

Good luck ;)
QxOrm admin
 

Re: QxOrm build error on mac

Postby QxOrm admin » Wed Aug 24, 2011 3:14 pm

QxOrm 1.1.8 just released : it's now ok to build and to use QxOrm library on Mac.
QxOrm admin
 


Return to QxOrm - Help

Who is online

Users browsing this forum: No registered users and 29 guests