I need static library of QxOrm

Use this forum to request new features or suggest modifications to existing features

Re: I need static library of QxOrm

Postby QxOrm admin » Mon Jan 30, 2012 4:16 pm

Ok, I will install a similar environment (MSVC2010, Qt and boost built into static mode) to see what happens...
QxOrm admin
 

Re: I need static library of QxOrm

Postby magicu » Tue Jan 31, 2012 4:28 am

QxOrm admin wrote:Ok, I will install a similar environment (MSVC2010, Qt and boost built into static mode) to see what happens...


Looking forward to your good news. :D
magicu
 
Posts: 54
Joined: Fri Jan 20, 2012 9:51 am

Re: I need static library of QxOrm

Postby QxOrm admin » Tue Jan 31, 2012 11:34 am

I just uploaded a first BETA version for QxOrm 1.2.3, you can download it here :
http://www.qxorm.com/version/QxOrm_1.2.3_BETA_03.zip

This version supports static build ! (at least, it works on my computer :) )
To build QxOrm into static mode, you just have to modify QxOrm.pri file :

Code: Select all
##############################
# QxOrm Library Static Build #
##############################

# To create only 1 EXE including Qt, boost serialization and QxOrm libraries without any dependency :
#   1- be sure to build Qt and boost::serialization using static mode
#   2- in "./QxOrm.pri" file, add the following line : "DEFINES += _QX_STATIC_BUILD"
#   3- BUT PLEASE : in your program, add a "readme.txt" file and a "about my program..." window to indicate that your application is based on Qt, boost and QxOrm libraries !
# Note : on Windows, static mode works with only 1 EXE, it will never work mixing DLL and EXE (because of singleton implementation of boost::serialization and QxOrm libraries)

# DEFINES += _QX_STATIC_BUILD
QxOrm admin
 

Re: I need static library of QxOrm

Postby magicu » Tue Jan 31, 2012 12:10 pm

QxOrm admin wrote:I just uploaded a first BETA version for QxOrm 1.2.3, you can download it here :
http://www.qxorm.com/version/QxOrm_1.2.3_BETA_03.zip

This version supports static build ! (at least, it works on my computer :) )
To build QxOrm into static mode, you just have to modify QxOrm.pri file :

Code: Select all
##############################
# QxOrm Library Static Build #
##############################

# To create only 1 EXE including Qt, boost serialization and QxOrm libraries without any dependency :
#   1- be sure to build Qt and boost::serialization using static mode
#   2- in "./QxOrm.pri" file, add the following line : "DEFINES += _QX_STATIC_BUILD"
#   3- BUT PLEASE : in your program, add a "readme.txt" file and a "about my program..." window to indicate that your application is based on Qt, boost and QxOrm libraries !
# Note : on Windows, static mode works with only 1 EXE, it will never work mixing DLL and EXE (because of singleton implementation of boost::serialization and QxOrm libraries)

# DEFINES += _QX_STATIC_BUILD




The requested URL could not be retrieved?
magicu
 
Posts: 54
Joined: Fri Jan 20, 2012 9:51 am

Re: I need static library of QxOrm

Postby QxOrm admin » Tue Jan 31, 2012 1:04 pm

Try to re-download it : the URL is good but sometimes it doesn't work (maybe when there are many downloads at the same time)...
QxOrm admin
 

Re: I need static library of QxOrm

Postby magicu » Tue Jan 31, 2012 1:21 pm

QxOrm admin wrote:Try to re-download it : the URL is good but sometimes it doesn't work (maybe when there are many downloads at the same time)...


I have built static QxOrm successfully, Thanks for your hard work.

I also have a advice, Could you name the static library after "LibQxOrm.lib, LibQxOrmd.lib", and name the shared library after "QxOrm.lib, QxOrmd.lib", Just like boost does. It is more easier to distinguish them. And I can put them in same folder. :D
magicu
 
Posts: 54
Joined: Fri Jan 20, 2012 9:51 am

Re: I need static library of QxOrm

Postby QxOrm admin » Tue Jan 31, 2012 2:21 pm

I have built static QxOrm successfully

Oki, thanx to have tested and to confirm that static build works correctly with your computer too 8-)

Could you name the static library after "LibQxOrm.lib, LibQxOrmd.lib"

It will be done for the next release...
QxOrm admin
 

Re: I need static library of QxOrm

Postby magicu » Wed Feb 01, 2012 4:53 am

QxOrm admin wrote:
I have built static QxOrm successfully

Oki, thanx to have tested and to confirm that static build works correctly with your computer too 8-)

Could you name the static library after "LibQxOrm.lib, LibQxOrmd.lib"

It will be done for the next release...



Bad news.

When I build my application with static QxOrm, I get many errors(But no error in shared mode):

1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) already defined in libcpmtd.lib(xlock.obj)
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __thiscall std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QAE@H@Z) already defined in libcpmtd.lib(xlock.obj)
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)" (?_Debug_message@std@@YAXPB_W0I@Z) already defined in libcpmtd.lib(stdthrow.obj)
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: struct std::_Iterator_base12 * * __thiscall std::_Container_base12::_Getpfirst(void)const " (?_Getpfirst@_Container_base12@std@@QBEPAPAU_Iterator_base12@2@XZ) already defined in Admin.obj
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: void __thiscall std::_Container_base12::_Orphan_all(void)" (?_Orphan_all@_Container_base12@std@@QAEXXZ) already defined in Admin.obj
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __thiscall std::_Container_base12::~_Container_base12(void)" (??1_Container_base12@std@@QAE@XZ) already defined in Admin.obj
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __thiscall std::_Container_base12::_Container_base12(void)" (??0_Container_base12@std@@QAE@XZ) already defined in Admin.obj
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "void __cdecl std::_Xlength_error(char const *)" (?_Xlength_error@std@@YAXPBD@Z) already defined in libcpmtd.lib(xthrow.obj)
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "void __cdecl std::_Xout_of_range(char const *)" (?_Xout_of_range@std@@YAXPBD@Z) already defined in libcpmtd.lib(xthrow.obj)
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: class std::basic_streambuf<char,struct std::char_traits<char> > * __thiscall std::basic_ios<char,struct std::char_traits<char> >::rdbuf(void)const " (?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ) already defined in Admin.obj
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: static void __cdecl std::locale::facet::operator delete(void *)" (??3facet@locale@std@@SAXPAX@Z) already defined in Admin.obj
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: class std::locale __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::pubimbue(class std::locale const &)" (?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z) already defined in LibQxOrmd.lib(QxTools.obj)
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: static class std::locale const & __cdecl std::locale::classic(void)" (?classic@locale@std@@SAABV12@XZ) already defined in libcpmtd.lib(locale0.obj)
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: static void * __cdecl std::locale::facet::operator new(unsigned int)" (??2facet@locale@std@@SAPAXI@Z) already defined in LibQxOrmd.lib(QxTools.obj)
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: class std::locale::facet * __thiscall std::locale::facet::_Decref(void)" (?_Decref@facet@locale@std@@QAEPAV123@XZ) already defined in Admin.obj
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __thiscall std::codecvt<char,char,int>::codecvt<char,char,int>(unsigned int)" (??0?$codecvt@DDH@std@@QAE@I@Z) already defined in LibQxOrmd.lib(QxTools.obj)
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "protected: virtual __thiscall std::codecvt<char,char,int>::~codecvt<char,char,int>(void)" (??1?$codecvt@DDH@std@@MAE@XZ) already defined in LibQxOrmd.lib(QxTools.obj)
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __int64 __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sgetn(char *,__int64)" (?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE_JPAD_J@Z) already defined in Admin.obj
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sgetc(void)" (?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ) already defined in Admin.obj
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sbumpc(void)" (?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ) already defined in Admin.obj
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: class std::locale __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::getloc(void)const " (?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QBE?AVlocale@2@XZ) already defined in LibQxOrmd.lib(QxTools.obj)
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: static void __cdecl std::locale::facet::operator delete(void *,struct std::_DebugHeapTag_t const &,char *,int)" (??3facet@locale@std@@SAXPAXABU_DebugHeapTag_t@2@PADH@Z) already defined in Admin.obj
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: class std::_Yarn<char> & __thiscall std::_Yarn<char>::operator=(char const *)" (??4?$_Yarn@D@std@@QAEAAV01@PBD@Z) already defined in LibQxOrmd.lib(QxTools.obj)
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: static unsigned int __cdecl std::codecvt<char,char,int>::_Getcat(class std::locale::facet const * *,class std::locale const *)" (?_Getcat@?$codecvt@DDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z) already defined in LibQxOrmd.lib(QxTools.obj)
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "private: void __thiscall std::locale::_Locimp::_Addfac(class std::locale::facet *,unsigned int)" (?_Addfac@_Locimp@locale@std@@AAEXPAVfacet@23@I@Z) already defined in LibQxOrmd.lib(QxTools.obj)
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __thiscall std::locale::id::operator unsigned int(void)" (??Bid@locale@std@@QAEIXZ) already defined in Admin.obj
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "private: __thiscall std::locale::_Locimp::_Locimp(class std::locale::_Locimp const &)" (??0_Locimp@locale@std@@AAE@ABV012@@Z) already defined in LibQxOrmd.lib(QxTools.obj)
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: static void * __cdecl std::locale::facet::operator new(unsigned int,struct std::_DebugHeapTag_t const &,char *,int)" (??2facet@locale@std@@SAPAXIABU_DebugHeapTag_t@2@PADH@Z) already defined in Admin.obj
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "struct std::_DebugHeapTag_t const & __cdecl std::_DebugHeapTag_func(void)" (?_DebugHeapTag_func@std@@YAABU_DebugHeapTag_t@1@XZ) already defined in libcpmtd.lib(xdebug.obj)
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "protected: virtual __thiscall std::locale::_Locimp::~_Locimp(void)" (??1_Locimp@locale@std@@MAE@XZ) already defined in LibQxOrmd.lib(QxTools.obj)
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __int64 __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputn(char const *,__int64)" (?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE_JPBD_J@Z) already defined in Admin.obj
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: class std::basic_istream<char,struct std::char_traits<char> > & __thiscall std::basic_istream<char,struct std::char_traits<char> >::operator>>(unsigned int &)" (??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAI@Z) already defined in Admin.obj
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: bool __thiscall std::ios_base::fail(void)const " (?fail@ios_base@std@@QBE_NXZ) already defined in Admin.obj
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(unsigned int)" (??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@I@Z) already defined in Admin.obj
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(int)" (??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z) already defined in Admin.obj
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: bool __thiscall std::ios_base::good(void)const " (?good@ios_base@std@@QBE_NXZ) already defined in Admin.obj
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(bool)" (??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_N@Z) already defined in Admin.obj
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "struct std::_Smanip<__int64> __cdecl std::setprecision(__int64)" (?setprecision@std@@YA?AU?$_Smanip@_J@1@_J@Z) already defined in libcpmtd.lib(iomanip.obj)
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(double)" (??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@N@Z) already defined in LibQxOrmd.lib(QxSerialize_QMatrix.obj)
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: int __thiscall std::ios_base::flags(void)const " (?flags@ios_base@std@@QBEHXZ) already defined in Admin.obj
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __int64 __thiscall std::ios_base::precision(void)const " (?precision@ios_base@std@@QBE_JXZ) already defined in Admin.obj
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __int64 __thiscall std::ios_base::precision(__int64)" (?precision@ios_base@std@@QAE_J_J@Z) already defined in libcpmtd.lib(iomanip.obj)
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: void __thiscall std::_Container_base12::_Swap_all(struct std::_Container_base12 &)" (?_Swap_all@_Container_base12@std@@QAEXAAU12@@Z) already defined in QtCored.lib(qglobal.obj)
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: static unsigned int __cdecl std::numeric_limits<unsigned int>::max(void)" (?max@?$numeric_limits@I@std@@SAIXZ) already defined in Admin.obj
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: class std::basic_istream<char,struct std::char_traits<char> > & __thiscall std::basic_istream<char,struct std::char_traits<char> >::operator>>(int &)" (??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAH@Z) already defined in Admin.obj
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: "public: int __thiscall type_info::before(class type_info const &)const " (?before@type_info@@QBEHABV1@@Z) already defined in LIBCMTD.lib(typinfo.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: "public: bool __thiscall type_info::operator!=(class type_info const &)const " (??9type_info@@QBE_NABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: __wassert already defined in LIBCMTD.lib(wassert.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: __invalid_parameter already defined in LIBCMTD.lib(invarg.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: __CrtDbgReportW already defined in LIBCMTD.lib(dbgrptw.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: "public: __thiscall std::exception::exception(char const * const &)" (??0exception@std@@QAE@ABQBD@Z) already defined in LIBCMTD.lib(stdexcpt.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: "public: virtual __thiscall std::exception::~exception(void)" (??1exception@std@@UAE@XZ) already defined in LIBCMTD.lib(stdexcpt.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: "public: __thiscall std::exception::exception(class std::exception const &)" (??0exception@std@@QAE@ABV01@@Z) already defined in LIBCMTD.lib(stdexcpt.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _memmove already defined in LIBCMTD.lib(memmove.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _free already defined in LIBCMTD.lib(dbgfree.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _wcslen already defined in LIBCMTD.lib(wcslen.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _mbtowc already defined in LIBCMTD.lib(mbtowc.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: "public: __thiscall std::exception::exception(void)" (??0exception@std@@QAE@XZ) already defined in LIBCMTD.lib(stdexcpt.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _wctomb already defined in LIBCMTD.lib(wctomb.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: "public: bool __thiscall type_info::operator==(class type_info const &)const " (??8type_info@@QBE_NABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _isdigit already defined in LIBCMTD.lib(_ctype.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _tolower already defined in LIBCMTD.lib(tolower.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _isspace already defined in LIBCMTD.lib(_ctype.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _iswspace already defined in LIBCMTD.lib(_wctype.obj)
1>MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
1>MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: "public: char const * __thiscall type_info::_name_internal_method(struct __type_info_node *)const " (?_name_internal_method@type_info@@QBEPBDPAU__type_info_node@@@Z) already defined in LIBCMTD.lib(typinfo.obj)
1> Creating library Z:\DotNet Projects\CardSystem\Debug\CardSystem.CppServer.lib and object Z:\DotNet Projects\CardSystem\Debug\CardSystem.CppServer.exp
1>LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
1>LibQxOrmd.lib(QxTransaction.obj) : error LNK2019: unresolved external symbol "public: bool __thiscall QAbstractSocket::waitForDisconnected(int)" (?waitForDisconnected@QAbstractSocket@@QAE_NH@Z) referenced in function "public: void __thiscall qx::service::QxTransaction::executeClient(class qx::service::IxService *,class QString const &)" (?executeClient@QxTransaction@service@qx@@QAEXPAVIxService@23@ABVQString@@@Z)
1>LibQxOrmd.lib(QxTransaction.obj) : error LNK2019: unresolved external symbol "public: enum QAbstractSocket::SocketState __thiscall QAbstractSocket::state(void)const " (?state@QAbstractSocket@@QBE?AW4SocketState@1@XZ) referenced in function "public: void __thiscall qx::service::QxTransaction::executeClient(class qx::service::IxService *,class QString const &)" (?executeClient@QxTransaction@service@qx@@QAEXPAVIxService@23@ABVQString@@@Z)
1>LibQxOrmd.lib(QxTransaction.obj) : error LNK2019: unresolved external symbol "public: void __thiscall QAbstractSocket::disconnectFromHost(void)" (?disconnectFromHost@QAbstractSocket@@QAEXXZ) referenced in function "public: void __thiscall qx::service::QxTransaction::executeClient(class qx::service::IxService *,class QString const &)" (?executeClient@QxTransaction@service@qx@@QAEXPAVIxService@23@ABVQString@@@Z)
1>LibQxOrmd.lib(QxTransaction.obj) : error LNK2019: unresolved external symbol "public: unsigned short __thiscall QAbstractSocket::localPort(void)const " (?localPort@QAbstractSocket@@QBEGXZ) referenced in function "public: void __thiscall qx::service::QxTransaction::executeClient(class qx::service::IxService *,class QString const &)" (?executeClient@QxTransaction@service@qx@@QAEXPAVIxService@23@ABVQString@@@Z)
1>LibQxOrmd.lib(QxTransaction.obj) : error LNK2019: unresolved external symbol "public: __thiscall QHostAddress::~QHostAddress(void)" (??1QHostAddress@@QAE@XZ) referenced in function "public: void __thiscall qx::service::QxTransaction::executeClient(class qx::service::IxService *,class QString const &)" (?executeClient@QxTransaction@service@qx@@QAEXPAVIxService@23@ABVQString@@@Z)
1>LibQxOrmd.lib(QxTransaction.obj) : error LNK2019: unresolved external symbol "public: class QString __thiscall QHostAddress::toString(void)const " (?toString@QHostAddress@@QBE?AVQString@@XZ) referenced in function "public: void __thiscall qx::service::QxTransaction::executeClient(class qx::service::IxService *,class QString const &)" (?executeClient@QxTransaction@service@qx@@QAEXPAVIxService@23@ABVQString@@@Z)
1>LibQxOrmd.lib(QxTransaction.obj) : error LNK2019: unresolved external symbol "public: class QHostAddress __thiscall QAbstractSocket::localAddress(void)const " (?localAddress@QAbstractSocket@@QBE?AVQHostAddress@@XZ) referenced in function "public: void __thiscall qx::service::QxTransaction::executeClient(class qx::service::IxService *,class QString const &)" (?executeClient@QxTransaction@service@qx@@QAEXPAVIxService@23@ABVQString@@@Z)
1>LibQxOrmd.lib(QxTransaction.obj) : error LNK2019: unresolved external symbol "public: virtual __thiscall QTcpSocket::~QTcpSocket(void)" (??1QTcpSocket@@UAE@XZ) referenced in function "public: void __thiscall qx::service::QxTransaction::executeClient(class qx::service::IxService *,class QString const &)" (?executeClient@QxTransaction@service@qx@@QAEXPAVIxService@23@ABVQString@@@Z)
1>LibQxOrmd.lib(QxTransaction.obj) : error LNK2019: unresolved external symbol "public: bool __thiscall QAbstractSocket::waitForConnected(int)" (?waitForConnected@QAbstractSocket@@QAE_NH@Z) referenced in function "public: void __thiscall qx::service::QxTransaction::executeClient(class qx::service::IxService *,class QString const &)" (?executeClient@QxTransaction@service@qx@@QAEXPAVIxService@23@ABVQString@@@Z)
1>LibQxOrmd.lib(QxTransaction.obj) : error LNK2019: unresolved external symbol "public: void __thiscall QAbstractSocket::connectToHost(class QString const &,unsigned short,class QFlags<enum QIODevice::OpenModeFlag>)" (?connectToHost@QAbstractSocket@@QAEXABVQString@@GV?$QFlags@W4OpenModeFlag@QIODevice@@@@@Z) referenced in function "public: void __thiscall qx::service::QxTransaction::executeClient(class qx::service::IxService *,class QString const &)" (?executeClient@QxTransaction@service@qx@@QAEXPAVIxService@23@ABVQString@@@Z)
1>LibQxOrmd.lib(QxTransaction.obj) : error LNK2019: unresolved external symbol "public: __thiscall QTcpSocket::QTcpSocket(class QObject *)" (??0QTcpSocket@@QAE@PAVQObject@@@Z) referenced in function "public: void __thiscall qx::service::QxTransaction::executeClient(class qx::service::IxService *,class QString const &)" (?executeClient@QxTransaction@service@qx@@QAEXPAVIxService@23@ABVQString@@@Z)
1>Z:\DotNet Projects\CardSystem\Debug\\CardSystem.CppServer.exe : fatal error LNK1120: 11 unresolved externals


It seems that QxOrm use many functions only existed in shared library of VC runtime. I sent my project to your email. Could you check it please.
magicu
 
Posts: 54
Joined: Fri Jan 20, 2012 9:51 am

Re: I need static library of QxOrm

Postby QxOrm admin » Wed Feb 01, 2012 9:18 am

There is a lot of things that are not OK with your project.
An advice : before starting your own project, please read carefully all samples into ./test/ directory of QxOrm package to see how it works and how to create your own project (at least read qxBlog project and qxBlog tutorial and try to build it).
qxBlog project works without problem with shared and link build with QxOrm 1.2.3 BETA 03 I provide in this thread. Do you try it ?

Then some quick notes about your project :
1- Where is your *.pro file for qmake process ? (see http://www.qxorm.com/qxorm_en/tutorial.html#tuto_3)
2- Your precompiled header file is 'stdafx.h' ===> ok, but you don't have to put into this file your own classes (see http://www.qxorm.com/qxorm_en/tutorial.html#tuto_5)
3- You write always #include "QxOrm.h" and #include "QxMemLeak.h" ===> it's not ok, you have to write #include <QxOrm.h> and #include <QxMemLeak.h>
4- QX_REGISTER_PRIMARY_KEY(Admin, int) ===> ok, but why do you not use long type by default for your primary key (see http://www.qxorm.com/qxorm_en/faq.html#faq_100) ?
5- Admin() : id(0) {}; ===> ok but what about 'is_frozen' and 'level' initializations properties ? (same thing for other classes of your project)
6- You don't have to include #include "export.h" into each header files ===> because it is already into your precompiled header.
7- You work with Qt and not MFC ===> why do you use L"" and wstring ? QString is more easy to use when you have Qt framework
8- using namespace std; into your precompiled header ===> very bad ! using namespace should never be into header file, and never never into a precompiled header

I just read quickly your project, I think there is some other things that are not ok but I have no time to read it more in details.
So my advice : first try to build qxBlog statically and if it works, try to start your project from this one...
If qxblog project can be built statically (and it can with 1.2.3 BETA 03 because I have tested it), so this is a problem with your project, not with QxOrm library.

LAST BUT NOT LEAST : are you sure that your project linked statically will be OK with LGPL license of Qt and QxOrm libraries ?
If it's an open-source project, there is no problem, but if it's a closed-project (commercial or not), LGPL license can be a problem with static build (there is no problem using dynamic build).
Be careful with it and read on other forums about static build and LGPL license.
To workaround any problems, I will create for QxOrm 1.2.3 a double license (like Qt) : 1 LGPL license and 1 comercial license...
QxOrm admin
 

Re: I need static library of QxOrm

Postby magicu » Wed Feb 01, 2012 10:28 am

QxOrm admin wrote:There is a lot of things that are not OK with your project.
An advice : before starting your own project, please read carefully all samples into ./test/ directory of QxOrm package to see how it works and how to create your own project (at least read qxBlog project and qxBlog tutorial and try to build it).
qxBlog project works without problem with shared and link build with QxOrm 1.2.3 BETA 03 I provide in this thread. Do you try it ?

Then some quick notes about your project :
1- Where is your *.pro file for qmake process ? (see http://www.qxorm.com/qxorm_en/tutorial.html#tuto_3)
2- Your precompiled header file is 'stdafx.h' ===> ok, but you don't have to put into this file your own classes (see http://www.qxorm.com/qxorm_en/tutorial.html#tuto_5)
3- You write always #include "QxOrm.h" and #include "QxMemLeak.h" ===> it's not ok, you have to write #include <QxOrm.h> and #include <QxMemLeak.h>
4- QX_REGISTER_PRIMARY_KEY(Admin, int) ===> ok, but why do you not use long type by default for your primary key (see http://www.qxorm.com/qxorm_en/faq.html#faq_100) ?
5- Admin() : id(0) {}; ===> ok but what about 'is_frozen' and 'level' initializations properties ? (same thing for other classes of your project)
6- You don't have to include #include "export.h" into each header files ===> because it is already into your precompiled header.
7- You work with Qt and not MFC ===> why do you use L"" and wstring ? QString is more easy to use when you have Qt framework
8- using namespace std; into your precompiled header ===> very bad ! using namespace should never be into header file, and never never into a precompiled header

I just read quickly your project, I think there is some other things that are not ok but I have no time to read it more in details.
So my advice : first try to build qxBlog statically and if it works, try to start your project from this one...
If qxblog project can be built statically (and it can with 1.2.3 BETA 03 because I have tested it), so this is a problem with your project, not with QxOrm library.

LAST BUT NOT LEAST : are you sure that your project linked statically will be OK with LGPL license of Qt and QxOrm libraries ?
If it's an open-source project, there is no problem, but if it's a closed-project (commercial or not), LGPL license can be a problem with static build (there is no problem using dynamic build).
Be careful with it and read on other forums about static build and LGPL license.
To workaround any problems, I will create for QxOrm 1.2.3 a double license (like Qt) : 1 LGPL license and 1 comercial license...



1. I have installed qt-vs-addin-1.1.10, so I don't need pro file any more.
2. The MSVC demand precompiled header to be included in all cpp files.

Thanks for your tips about 3,4,5,6,7,8.

This project is only for study purpose, I have another project that follow LGPL. I'll try to build qxBlog with static library later, and post the result here if I have any result, Thank you.
magicu
 
Posts: 54
Joined: Fri Jan 20, 2012 9:51 am

PreviousNext

Return to QxOrm - Feature request

Who is online

Users browsing this forum: No registered users and 4 guests

cron