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 » Wed Feb 01, 2012 10:55 am

2. The MSVC demand precompiled header to be included in all cpp files.

Yes, but this is not what I wrote : into your precompiled header, you have :
Code: Select all
#include "Admin.h"
#include "User.h"
#include "Card.h"
#include "CardType.h"
#include "PluginInfo.h"

This is not a good idea to include those files into your precompiled header : you have to put into your precompiled header only "stables" files => so it's perfect to include your libraries headers (like Qt, boost or QxOrm), but not your project files.
QxOrm admin
 

Re: I need static library of QxOrm

Postby magicu » Wed Feb 01, 2012 2:32 pm

Could you tell me How do you build qxBlog staticlly? I still have errors when building it.

This is my step:

1. Open qxBlog.sln and convert it to MSVC 2010 format.
2. Build solution.

The output shows just like my project that sent to you:

1>------ Build started: Project: QxOrm, Configuration: Debug Win32 ------
1>Build started 2012/2/1 22:23:50.
1>Build:
1>
1> Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
1> "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\nmake.exe" -f Makefile.Debug
1> Copyright (C) Microsoft Corporation. All rights reserved.
1>
1> 已复制 1 个文件。
1>
1> Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
1> Copyright (C) Microsoft Corporation. All rights reserved.
1>
1> 已复制 1 个文件。
1>
1>Build succeeded.
1>
1>Time Elapsed 00:00:03.01
2>------ Build started: Project: qxBlog, Configuration: Debug Win32 ------
2>Build started 2012/2/1 22:23:53.
2>Build:
2>
2> Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
2> Copyright (C) Microsoft Corporation. All rights reserved.
2>
2> "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\nmake.exe" -f Makefile.Debug
2>
2> Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
2> Copyright (C) Microsoft Corporation. All rights reserved.
2>
2> cl -c -Yc -Fpdebug\qxBlogd_pch.pch -Fodebug\qxBlogd_pch.obj -nologo -Zm200 -Zi -MTd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -D_QX_STATIC_BUILD -D_BUILDING_QX_BLOG -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"..\..\..\Qt\4.8.0\include\QtCore" -I"..\..\..\Qt\4.8.0\include\QtNetwork" -I"..\..\..\Qt\4.8.0\include\QtGui" -I"..\..\..\Qt\4.8.0\include\QtXml" -I"..\..\..\Qt\4.8.0\include\QtSql" -I"..\..\..\Qt\4.8.0\include" -I"include" -I"..\..\..\Boost" -I"..\..\..\QxOrm\include" -I"..\..\..\Qt\4.8.0\include\ActiveQt" -I"qt\moc" -I"..\..\..\Qt\4.8.0\mkspecs\default" -TP include\precompiled.h
2> precompiled.h
2> cl -c -FIprecompiled.h -Yuprecompiled.h -Fpdebug\qxBlogd_pch.pch -nologo -Zm200 -Zi -MTd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -D_QX_STATIC_BUILD -D_BUILDING_QX_BLOG -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"..\..\..\Qt\4.8.0\include\QtCore" -I"..\..\..\Qt\4.8.0\include\QtNetwork" -I"..\..\..\Qt\4.8.0\include\QtGui" -I"..\..\..\Qt\4.8.0\include\QtXml" -I"..\..\..\Qt\4.8.0\include\QtSql" -I"..\..\..\Qt\4.8.0\include" -I"include" -I"..\..\..\Boost" -I"..\..\..\QxOrm\include" -I"..\..\..\Qt\4.8.0\include\ActiveQt" -I"qt\moc" -I"..\..\..\Qt\4.8.0\mkspecs\default" -Fodebug\ @C:\Users\Howard\AppData\Local\Temp\nm7E55.tmp
2> author.cpp
2> blog.cpp
2> category.cpp
2> comment.cpp
2> main.cpp
2>src\main.cpp : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
2> Generating Code...
2> link /LIBPATH:"e:\Qt\4.8.0\lib" /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /MANIFEST /MANIFESTFILE:"debug\qxBlogd.intermediate.manifest" /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /OUT:..\..\..\QxOrm\test\_bin\qxBlogd.exe @C:\Users\Howard\AppData\Local\Temp\nmF5B6.tmp
2>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) already defined in libcpmtd.lib(xlock.obj)
2>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)
2>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)
2>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 author.obj
2>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: void __thiscall std::_Container_base12::_Orphan_all(void)" (?_Orphan_all@_Container_base12@std@@QAEXXZ) already defined in author.obj
2>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __thiscall std::_Container_base12::~_Container_base12(void)" (??1_Container_base12@std@@QAE@XZ) already defined in author.obj
2>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __thiscall std::_Container_base12::_Container_base12(void)" (??0_Container_base12@std@@QAE@XZ) already defined in author.obj
2>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)
2>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)
2>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 author.obj
2>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: static void __cdecl std::locale::facet::operator delete(void *)" (??3facet@locale@std@@SAXPAX@Z) already defined in author.obj
2>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 main.obj
2>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)
2>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 main.obj
2>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 author.obj
2>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 main.obj
2>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 main.obj
2>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 author.obj
2>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 author.obj
2>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 author.obj
2>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 main.obj
2>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 author.obj
2>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 main.obj
2>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 main.obj
2>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 main.obj
2>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __thiscall std::locale::id::operator unsigned int(void)" (??Bid@locale@std@@QAEIXZ) already defined in author.obj
2>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 main.obj
2>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 author.obj
2>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)
2>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "protected: virtual __thiscall std::locale::_Locimp::~_Locimp(void)" (??1_Locimp@locale@std@@MAE@XZ) already defined in main.obj
2>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 author.obj
2>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 author.obj
2>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: bool __thiscall std::ios_base::fail(void)const " (?fail@ios_base@std@@QBE_NXZ) already defined in author.obj
2>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 author.obj
2>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 author.obj
2>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: bool __thiscall std::ios_base::good(void)const " (?good@ios_base@std@@QBE_NXZ) already defined in author.obj
2>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 QxOrmd.lib(QxTransaction.obj)
2>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)
2>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 QxOrmd.lib(QxSerialize_QMatrix.obj)
2>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: int __thiscall std::ios_base::flags(void)const " (?flags@ios_base@std@@QBEHXZ) already defined in author.obj
2>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __int64 __thiscall std::ios_base::precision(void)const " (?precision@ios_base@std@@QBE_JXZ) already defined in author.obj
2>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)
2>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(qdatetime.obj)
2>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 author.obj
2>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 author.obj
2>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)
2>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)
2>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: __wassert already defined in LIBCMTD.lib(wassert.obj)
2>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: __invalid_parameter already defined in LIBCMTD.lib(invarg.obj)
2>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: __CrtDbgReportW already defined in LIBCMTD.lib(dbgrptw.obj)
2>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)
2>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: "public: virtual __thiscall std::exception::~exception(void)" (??1exception@std@@UAE@XZ) already defined in LIBCMTD.lib(stdexcpt.obj)
2>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)
2>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _memmove already defined in LIBCMTD.lib(memmove.obj)
2>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _free already defined in LIBCMTD.lib(dbgfree.obj)
2>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _wcslen already defined in LIBCMTD.lib(wcslen.obj)
2>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _mbtowc already defined in LIBCMTD.lib(mbtowc.obj)
2>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: "public: __thiscall std::exception::exception(void)" (??0exception@std@@QAE@XZ) already defined in LIBCMTD.lib(stdexcpt.obj)
2>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _wctomb already defined in LIBCMTD.lib(wctomb.obj)
2>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)
2>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _isdigit already defined in LIBCMTD.lib(_ctype.obj)
2>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _tolower already defined in LIBCMTD.lib(tolower.obj)
2>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _isspace already defined in LIBCMTD.lib(_ctype.obj)
2>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _iswspace already defined in LIBCMTD.lib(_wctype.obj)
2>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)
2>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)
2>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)
2> Creating library ..\..\..\QxOrm\test\_bin\qxBlogd.lib and object ..\..\..\QxOrm\test\_bin\qxBlogd.exp
2>LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
2>..\..\..\QxOrm\test\_bin\qxBlogd.exe : fatal error LNK1169: one or more multiply defined symbols found
2>NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\link.EXE"' : return code '0x491'
2> Stop.
2>NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\nmake.exe"' : return code '0x2'
2> Stop.
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command "qmake & nmake debug" exited with code 2.
2>
2>Build FAILED.
2>
2>Time Elapsed 00:00:53.18
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
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 3:48 pm

Could you tell me How do you build qxBlog staticlly? I still have errors when building it.

This is my step:

1. Open qxBlog.sln and convert it to MSVC 2010 format.
2. Build solution.

Step 0 => modify QxOrm.pri file ;)

I do the same things, I don't have any error, and I can execute qxBlog exec without problem.
Maybe the difference is : how do you link with compiler dependencies (msvc...lib files) ?
For me, it is linked dynamically !
QxOrm admin
 

Re: I need static library of QxOrm

Postby magicu » Wed Feb 01, 2012 4:02 pm

QxOrm admin wrote:
Could you tell me How do you build qxBlog staticlly? I still have errors when building it.

This is my step:

1. Open qxBlog.sln and convert it to MSVC 2010 format.
2. Build solution.

Step 0 => modify QxOrm.pri file ;)

I do the same things, I don't have any error, and I can execute qxBlog exec without problem.
Maybe the difference is : how do you link with compiler dependencies (msvc...lib files) ?
For me, it is linked dynamically !



How do you linked dynamically? I think all librares would be static lib if you use static mode. Could you please send me your qxBlog project to hcaihao@gmail.com?


This is my pri file:

###############################
# boost Library Configuration #
###############################

# In this section, it's necessary to specify boost directories (lib + include) and boost serialization module name (debug + release) :
# - QX_BOOST_INCLUDE_PATH : your boost include path
# - QX_BOOST_LIB_PATH : your boost lib path
# - QX_BOOST_LIB_SERIALIZATION_DEBUG : your boost serialization module name in debug mode
# - QX_BOOST_LIB_SERIALIZATION_RELEASE : your boost serialization module name in release mode

QX_BOOST_INCLUDE_PATH = $$quote(E:/Boost)
QX_BOOST_LIB_PATH = $$quote(E:/Boost/stage/lib)
QX_BOOST_LIB_SERIALIZATION_DEBUG = "libboost_serialization-vc100-mt-gd-1_48"
QX_BOOST_LIB_SERIALIZATION_RELEASE = "libboost_serialization-vc100-mt-1_48"

unix {
QX_BOOST_INCLUDE_PATH = $$quote(/usr/include)
QX_BOOST_LIB_PATH = $$quote(/usr/lib)
QX_BOOST_LIB_SERIALIZATION_DEBUG = "boost_serialization-mt-d"
QX_BOOST_LIB_SERIALIZATION_RELEASE = "boost_serialization-mt"
} # unix

##############################
# 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
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 4:41 pm

How do you linked dynamically? I think all librares would be static lib if you use static mode. Could you please send me your qxBlog project to hcaihao@gmail.com?

No not really, in my case I have :
- compiler dependencies (MSVCCRT files) => linked dynamically
- Qt 4.8.0 => linked dynamically (I have not tested with Qt linked statically)
- boost::serialization 1.48 => linked statically
- QxOrm 1.2.3 BETA 03 => linked statically
- qxBlog => EXEC

And, when I start qxBlog EXEC, I have :
Code: Select all
'qxBlogd.exe': Loaded 'D:\Dvlp\_Perso\QxOrm\test\_bin\qxBlogd.exe', Symbols loaded.
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll'
'qxBlogd.exe': Loaded 'D:\Dvlp\_Libs\Qt\4.7.1_MSVC\bin\QtSqld4.dll', Symbols loaded.
'qxBlogd.exe': Loaded 'D:\Dvlp\_Libs\Qt\4.7.1_MSVC\bin\QtCored4.dll', Symbols loaded.
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\user32.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\ws2_32.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\nsi.dll'
'qxBlogd.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.30729.1_none_bb1f6aa1308c35eb\msvcp90d.dll', Symbols loaded.
'qxBlogd.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.30729.1_none_bb1f6aa1308c35eb\msvcr90d.dll', Symbols loaded.
'qxBlogd.exe': Loaded 'D:\Dvlp\_Libs\Qt\4.7.1_MSVC\bin\QtGuid4.dll', Symbols loaded.
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\comdlg32.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\shlwapi.dll'
'qxBlogd.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2\comctl32.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\shell32.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\winmm.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\winspool.drv'
'qxBlogd.exe': Loaded 'D:\Dvlp\_Libs\Qt\4.7.1_MSVC\bin\QtNetworkd4.dll', Symbols loaded.
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\apphelp.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\nvinit.dll'
'qxBlogd.exe': Loaded 'C:\Program Files (x86)\Sophos\Sophos Anti-Virus\sophos_detoured.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\psapi.dll'
'qxBlogd.exe': Unloaded 'C:\Windows\SysWOW64\apphelp.dll'
'qxBlogd.exe': Loaded 'D:\Dvlp\_Libs\Qt\4.7.1_MSVC\plugins\sqldrivers\qsqlited4.dll'
[QxOrm] qx::QxSqlDatabase : create new database connection in thread '4764' with key '{72798a1b-9d48-4f4d-9042-34825aff43df}'
[QxOrm] sql query (116 ms) : CREATE TABLE author (author_id TEXT NOT NULL PRIMARY KEY, name TEXT, birthdate DATE, sex INTEGER)
etc...

As you can see, there is no QxOrm.dll loaded, and no boost::serialization dll loaded by the executable.

Could you please send me your qxBlog project to hcaihao@gmail.com?

What do you want exactly ? I don't understand.
QxOrm admin
 

Re: I need static library of QxOrm

Postby magicu » Thu Feb 02, 2012 3:39 am

QxOrm admin wrote:
How do you linked dynamically? I think all librares would be static lib if you use static mode. Could you please send me your qxBlog project to hcaihao@gmail.com?

No not really, in my case I have :
- compiler dependencies (MSVCCRT files) => linked dynamically
- Qt 4.8.0 => linked dynamically (I have not tested with Qt linked statically)
- boost::serialization 1.48 => linked statically
- QxOrm 1.2.3 BETA 03 => linked statically
- qxBlog => EXEC

And, when I start qxBlog EXEC, I have :
Code: Select all
'qxBlogd.exe': Loaded 'D:\Dvlp\_Perso\QxOrm\test\_bin\qxBlogd.exe', Symbols loaded.
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll'
'qxBlogd.exe': Loaded 'D:\Dvlp\_Libs\Qt\4.7.1_MSVC\bin\QtSqld4.dll', Symbols loaded.
'qxBlogd.exe': Loaded 'D:\Dvlp\_Libs\Qt\4.7.1_MSVC\bin\QtCored4.dll', Symbols loaded.
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\user32.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\ws2_32.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\nsi.dll'
'qxBlogd.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.30729.1_none_bb1f6aa1308c35eb\msvcp90d.dll', Symbols loaded.
'qxBlogd.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.30729.1_none_bb1f6aa1308c35eb\msvcr90d.dll', Symbols loaded.
'qxBlogd.exe': Loaded 'D:\Dvlp\_Libs\Qt\4.7.1_MSVC\bin\QtGuid4.dll', Symbols loaded.
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\comdlg32.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\shlwapi.dll'
'qxBlogd.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2\comctl32.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\shell32.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\winmm.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\winspool.drv'
'qxBlogd.exe': Loaded 'D:\Dvlp\_Libs\Qt\4.7.1_MSVC\bin\QtNetworkd4.dll', Symbols loaded.
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\apphelp.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\nvinit.dll'
'qxBlogd.exe': Loaded 'C:\Program Files (x86)\Sophos\Sophos Anti-Virus\sophos_detoured.dll'
'qxBlogd.exe': Loaded 'C:\Windows\SysWOW64\psapi.dll'
'qxBlogd.exe': Unloaded 'C:\Windows\SysWOW64\apphelp.dll'
'qxBlogd.exe': Loaded 'D:\Dvlp\_Libs\Qt\4.7.1_MSVC\plugins\sqldrivers\qsqlited4.dll'
[QxOrm] qx::QxSqlDatabase : create new database connection in thread '4764' with key '{72798a1b-9d48-4f4d-9042-34825aff43df}'
[QxOrm] sql query (116 ms) : CREATE TABLE author (author_id TEXT NOT NULL PRIMARY KEY, name TEXT, birthdate DATE, sex INTEGER)
etc...

As you can see, there is no QxOrm.dll loaded, and no boost::serialization dll loaded by the executable.

Could you please send me your qxBlog project to hcaihao@gmail.com?

What do you want exactly ? I don't understand.




So you're saying your qxBlog dependency imm32.dll, winmm.dll, QtCored4.dll, QtSqld4.dll...?

That's not a pure static mode, I want my application only have a exe file(all libraries are include in the exe). To do this, you should modify project setting of MSVC: C/C++->Code Generation->Runtime Library to "Multi-threaded Debug (/MTd)", and modify Linker->Input to "qtmaind.lib;QtCored.lib;QtGuid.lib;QtSqld.lib;Imm32.lib;Ws2_32.lib;Winmm.lib;QxOrmd.lib;libboost_serialization-vc100-mt-gd-1_48.lib;"
magicu
 
Posts: 54
Joined: Fri Jan 20, 2012 9:51 am

Re: I need static library of QxOrm

Postby QxOrm admin » Thu Feb 02, 2012 9:08 am

So you're saying your qxBlog dependency imm32.dll, winmm.dll, QtCored4.dll, QtSqld4.dll...? That's not a pure static mode...

Yes your are right, but it works and QxOrm is linked statically :D

If you have some time, could you please do some tests, because I think the problem comes from compiler dependencies (there is similar problems with MFC), but just to be sure :

1- Test qxBlog project in the same configuration as me to be sure it's working for you too :
- compiler dependencies (MSVCCRT files) => linked dynamically
- Qt 4.8.0 => linked dynamically
- boost::serialization 1.48 => linked statically
- QxOrm 1.2.3 BETA 03 => linked statically
- qxBlog => EXEC


2- Test qxBlog project adding Qt linked statically, so you will have the following config :
- compiler dependencies (MSVCCRT files) => linked dynamically
- Qt 4.8.0 => linked statically
- boost::serialization 1.48 => linked statically
- QxOrm 1.2.3 BETA 03 => linked statically
- qxBlog => EXEC


If 1- and 2- works fine for you, then there is only a problem with compiler dependencies (MSVCRT files)...

PS : just out of curiosity, why do you want static build for your study project ? It's strange because I don't understand why it's a problem to add some dll into a final package deployment (especially under Windows)...
QxOrm admin
 

Re: I need static library of QxOrm

Postby magicu » Thu Feb 02, 2012 12:10 pm

QxOrm admin wrote:
So you're saying your qxBlog dependency imm32.dll, winmm.dll, QtCored4.dll, QtSqld4.dll...? That's not a pure static mode...

Yes your are right, but it works and QxOrm is linked statically :D

If you have some time, could you please do some tests, because I think the problem comes from compiler dependencies (there is similar problems with MFC), but just to be sure :

1- Test qxBlog project in the same configuration as me to be sure it's working for you too :
- compiler dependencies (MSVCCRT files) => linked dynamically
- Qt 4.8.0 => linked dynamically
- boost::serialization 1.48 => linked statically
- QxOrm 1.2.3 BETA 03 => linked statically
- qxBlog => EXEC


2- Test qxBlog project adding Qt linked statically, so you will have the following config :
- compiler dependencies (MSVCCRT files) => linked dynamically
- Qt 4.8.0 => linked statically
- boost::serialization 1.48 => linked statically
- QxOrm 1.2.3 BETA 03 => linked statically
- qxBlog => EXEC


If 1- and 2- works fine for you, then there is only a problem with compiler dependencies (MSVCRT files)...

PS : just out of curiosity, why do you want static build for your study project ? It's strange because I don't understand why it's a problem to add some dll into a final package deployment (especially under Windows)...



There are still so many errors in phase 1, I havn't tried to compile dynamically & statically mixed project before.

BTW: Do you build static QxOrm under dynamically Qt? That will cause the problem that I come across.

The pure static build is not a necessary, but I have build many libraries statically, such as: Qt\Boost\Lua\LuaBind\Cryptopp\Detours\Zlib... but failed in QxOrm, just a little confused. If you don't have the time, reduces the priority of this problem. ;)
magicu
 
Posts: 54
Joined: Fri Jan 20, 2012 9:51 am

Re: I need static library of QxOrm

Postby QxOrm admin » Thu Feb 02, 2012 12:50 pm

There are still so many errors in phase 1

Ok, so we don't have the same dev environment, because there is no problem on my side.

BTW: Do you build static QxOrm under dynamically Qt?

Yes, as I said, it works for me under this configuration :
- compiler dependencies (MSVCCRT files) => linked dynamically
- Qt 4.8.0 => linked dynamically (I have not tested with Qt linked statically)
- boost::serialization 1.48 => linked statically
- QxOrm 1.2.3 BETA 03 => linked statically
- qxBlog => EXEC


The pure static build is not a necessary, but I have build many libraries statically, such as: Qt\Boost\Lua\LuaBind\Cryptopp\Detours\Zlib... but failed in QxOrm, just a little confused. If you don't have the time, reduces the priority of this problem. ;)

Yes, you are right, we will see it later, or wait for other people to test static build...
QxOrm admin
 

Previous

Return to QxOrm - Feature request

Who is online

Users browsing this forum: No registered users and 0 guests

cron