I need static library of QxOrm

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

I need static library of QxOrm

Postby magicu » Sun Jan 29, 2012 8:16 am

For many reasons, I need a single exe application that using QxOrm. Could you supply a static compile command. Thanks.
magicu
 
Posts: 54
Joined: Fri Jan 20, 2012 9:51 am

Re: I need static library of QxOrm

Postby QxOrm admin » Sun Jan 29, 2012 3:39 pm

Hi,

If you want to build only one exe including Qt, boost::serialization and QxOrm modules without any dependency, I think it would be quite easy to do.
First, be sure to build Qt and boost::serialization using static mode.
Then build QxOrm using static mode => do you have some errors during this process ?

Note : if you want to hide QxOrm library into your own DLL and then create an exe, it will never work (because of singleton implementation of boost serialization and QxOrm library).
It will work only for 1 exe...
QxOrm admin
 

Re: I need static library of QxOrm

Postby Guest » Mon Jan 30, 2012 3:27 am

QxOrm admin wrote:Hi,

If you want to build only one exe including Qt, boost::serialization and QxOrm modules without any dependency, I think it would be quite easy to do.
First, be sure to build Qt and boost::serialization using static mode.
Then build QxOrm using static mode => do you have some errors during this process ?

Note : if you want to hide QxOrm library into your own DLL and then create an exe, it will never work (because of singleton implementation of boost serialization and QxOrm library).
It will work only for 1 exe...



When I build QxOrm using static mode. I follow steps:

1. Build static boost using "bjam --toolset=msvc --build-type=complete stage"
2. Modify QxOrm.pri as

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"

3. Use "E:\QxOrm>tools\_build_debug.bat" to build QxOrm.

I get many errors:



IxDao_Helper.obj : error LNK2019: unresolved external symbol "__declspec(dllimpo
rt) public: __thiscall QSqlQuery::QSqlQuery(class QSqlDatabase)" (__imp_??0QSqlQ
uery@@QAE@VQSqlDatabase@@@Z) referenced in function "protected: void __thiscall
qx::dao::detail::IxDao_Helper::init(class QSqlDatabase *,class QString const &)"
(?init@IxDao_Helper@detail@dao@qx@@IAEXPAVQSqlDatabase@@ABVQString@@@Z)
IxDao_Helper.obj : error LNK2019: unresolved external symbol "__declspec(dllimpo
rt) public: bool __thiscall QSqlDatabase::isValid(void)const " (__imp_?isValid@Q
SqlDatabase@@QBE_NXZ) referenced in function "protected: void __thiscall qx::dao
::detail::IxDao_Helper::init(class QSqlDatabase *,class QString const &)" (?init
@IxDao_Helper@detail@dao@qx@@IAEXPAVQSqlDatabase@@ABVQString@@@Z)
IxRepository.obj : error LNK2001: unresolved external symbol "__declspec(dllimpo
rt) public: bool __thiscall QSqlDatabase::isValid(void)const " (__imp_?isValid@Q
SqlDatabase@@QBE_NXZ)
IxDao_Helper.obj : error LNK2019: unresolved external symbol "__declspec(dllimpo
rt) public: class QString __thiscall QSqlError::databaseText(void)const " (__imp
_?databaseText@QSqlError@@QBE?AVQString@@XZ) referenced in function "protected:
void __thiscall qx::dao::detail::IxDao_Helper::terminate(void)" (?terminate@IxDa
o_Helper@detail@dao@qx@@IAEXXZ)
IxDao_Helper.obj : error LNK2019: unresolved external symbol "__declspec(dllimpo
rt) public: class QString __thiscall QSqlError::driverText(void)const " (__imp_?
driverText@QSqlError@@QBE?AVQString@@XZ) referenced in function "protected: void
__thiscall qx::dao::detail::IxDao_Helper::terminate(void)" (?terminate@IxDao_He
lper@detail@dao@qx@@IAEXXZ)
QxSqlGenerator_PostgreSQL.obj : error LNK2019: unresolved external symbol "__dec
lspec(dllimport) public: class QVariant __thiscall QSqlQuery::value(int)const "
(__imp_?value@QSqlQuery@@QBE?AVQVariant@@H@Z) referenced in function "public: vi
rtual void __thiscall qx::dao::detail::QxSqlGenerator_PostgreSQL::onAfterInsert(
class qx::dao::detail::IxDao_Helper *,void *)const " (?onAfterInsert@QxSqlGenera
tor_PostgreSQL@detail@dao@qx@@UBEXPAVIxDao_Helper@234@PAX@Z)
QxExportDllBoostArchive.obj : error LNK2019: unresolved external symbol "__decls
pec(dllimport) public: static class boost::archive::detail::basic_serializer con
st * __cdecl boost::archive::detail::archive_serializer_map<class boost::archive
::binary_iarchive>::find(class boost::serialization::extended_type_info const &)
" (__imp_?find@?$archive_serializer_map@Vbinary_iarchive@archive@boost@@@detail@
archive@boost@@SAPBVbasic_serializer@234@ABVextended_type_info@serialization@4@@
Z) referenced in function "public: static class boost::archive::detail::basic_po
inter_iserializer const * __cdecl boost::archive::detail::load_pointer_type<clas
s boost::archive::binary_iarchive>::find(class boost::serialization::extended_ty
pe_info const &)" (?find@?$load_pointer_type@Vbinary_iarchive@archive@boost@@@de
tail@archive@boost@@SAPBVbasic_pointer_iserializer@234@ABVextended_type_info@ser
ialization@4@@Z)
IxService.obj : error LNK2001: unresolved external symbol "__declspec(dllimport)
public: static class boost::archive::detail::basic_serializer const * __cdecl b
oost::archive::detail::archive_serializer_map<class boost::archive::binary_iarch
ive>::find(class boost::serialization::extended_type_info const &)" (__imp_?find
@?$archive_serializer_map@Vbinary_iarchive@archive@boost@@@detail@archive@boost@
@SAPBVbasic_serializer@234@ABVextended_type_info@serialization@4@@Z)
QxTransaction.obj : error LNK2001: unresolved external symbol "__declspec(dllimp
ort) public: static class boost::archive::detail::basic_serializer const * __cde
cl boost::archive::detail::archive_serializer_map<class boost::archive::binary_i
archive>::find(class boost::serialization::extended_type_info const &)" (__imp_?
find@?$archive_serializer_map@Vbinary_iarchive@archive@boost@@@detail@archive@bo
ost@@SAPBVbasic_serializer@234@ABVextended_type_info@serialization@4@@Z)
QxExportDllBoostArchive.obj : error LNK2019: unresolved external symbol "__decls
pec(dllimport) public: static class boost::archive::detail::basic_serializer con
st * __cdecl boost::archive::detail::archive_serializer_map<class boost::archive
::binary_oarchive>::find(class boost::serialization::extended_type_info const &)
" (__imp_?find@?$archive_serializer_map@Vbinary_oarchive@archive@boost@@@detail@
archive@boost@@SAPBVbasic_serializer@234@ABVextended_type_info@serialization@4@@
Z) referenced in function "public: static class boost::archive::detail::basic_po
inter_iserializer const * __cdecl boost::archive::detail::load_pointer_type<clas
s boost::archive::binary_oarchive>::find(class boost::serialization::extended_ty
pe_info const &)" (?find@?$load_pointer_type@Vbinary_oarchive@archive@boost@@@de
tail@archive@boost@@SAPBVbasic_pointer_iserializer@234@ABVextended_type_info@ser
ialization@4@@Z)
IxService.obj : error LNK2001: unresolved external symbol "__declspec(dllimport)
public: static class boost::archive::detail::basic_serializer const * __cdecl b
oost::archive::detail::archive_serializer_map<class boost::archive::binary_oarch
ive>::find(class boost::serialization::extended_type_info const &)" (__imp_?find
@?$archive_serializer_map@Vbinary_oarchive@archive@boost@@@detail@archive@boost@
@SAPBVbasic_serializer@234@ABVextended_type_info@serialization@4@@Z)
QxTransaction.obj : error LNK2001: unresolved external symbol "__declspec(dllimp
ort) public: static class boost::archive::detail::basic_serializer const * __cde
cl boost::archive::detail::archive_serializer_map<class boost::archive::binary_o
archive>::find(class boost::serialization::extended_type_info const &)" (__imp_?
find@?$archive_serializer_map@Vbinary_oarchive@archive@boost@@@detail@archive@bo
ost@@SAPBVbasic_serializer@234@ABVextended_type_info@serialization@4@@Z)
IxParameter.obj : error LNK2001: unresolved external symbol "__declspec(dllimpor
t) public: static bool __cdecl boost::archive::detail::archive_serializer_map<cl
ass boost::archive::binary_iarchive>::insert(class boost::archive::detail::basic
_serializer const *)" (__imp_?insert@?$archive_serializer_map@Vbinary_iarchive@a
rchive@boost@@@detail@archive@boost@@SA_NPBVbasic_serializer@234@@Z)
IxService.obj : error LNK2001: unresolved external symbol "__declspec(dllimport)
public: static bool __cdecl boost::archive::detail::archive_serializer_map<clas
s boost::archive::binary_iarchive>::insert(class boost::archive::detail::basic_s
erializer const *)" (__imp_?insert@?$archive_serializer_map@Vbinary_iarchive@arc
hive@boost@@@detail@archive@boost@@SA_NPBVbasic_serializer@234@@Z)
QxTransaction.obj : error LNK2001: unresolved external symbol "__declspec(dllimp
ort) public: static bool __cdecl boost::archive::detail::archive_serializer_map<
class boost::archive::binary_iarchive>::insert(class boost::archive::detail::bas
ic_serializer const *)" (__imp_?insert@?$archive_serializer_map@Vbinary_iarchive
@archive@boost@@@detail@archive@boost@@SA_NPBVbasic_serializer@234@@Z)
QxSerialize_QImage.obj : error LNK2019: unresolved external symbol "__declspec(d
llimport) public: static bool __cdecl boost::archive::detail::archive_serializer
_map<class boost::archive::binary_iarchive>::insert(class boost::archive::detail
::basic_serializer const *)" (__imp_?insert@?$archive_serializer_map@Vbinary_iar
chive@archive@boost@@@detail@archive@boost@@SA_NPBVbasic_serializer@234@@Z) refe
renced in function "protected: __thiscall boost::archive::detail::pointer_iseria
lizer<class boost::archive::binary_iarchive,class QImage>::pointer_iserializer<c
lass boost::archive::binary_iarchive,class QImage>(void)" (??0?$pointer_iseriali
zer@Vbinary_iarchive@archive@boost@@VQImage@@@detail@archive@boost@@IAE@XZ)
QxSerialize_QObject.obj : error LNK2001: unresolved external symbol "__declspec(
dllimport) public: static bool __cdecl boost::archive::detail::archive_serialize
r_map<class boost::archive::binary_iarchive>::insert(class boost::archive::detai
l::basic_serializer const *)" (__imp_?insert@?$archive_serializer_map@Vbinary_ia
rchive@archive@boost@@@detail@archive@boost@@SA_NPBVbasic_serializer@234@@Z)
QxSerialize_QPicture.obj : error LNK2001: unresolved external symbol "__declspec
(dllimport) public: static bool __cdecl boost::archive::detail::archive_serializ
er_map<class boost::archive::binary_iarchive>::insert(class boost::archive::deta
il::basic_serializer const *)" (__imp_?insert@?$archive_serializer_map@Vbinary_i
archive@archive@boost@@@detail@archive@boost@@SA_NPBVbasic_serializer@234@@Z)
QxSerialize_QPixmap.obj : error LNK2001: unresolved external symbol "__declspec(
dllimport) public: static bool __cdecl boost::archive::detail::archive_serialize
r_map<class boost::archive::binary_iarchive>::insert(class boost::archive::detai
l::basic_serializer const *)" (__imp_?insert@?$archive_serializer_map@Vbinary_ia
rchive@archive@boost@@@detail@archive@boost@@SA_NPBVbasic_serializer@234@@Z)
IxParameter.obj : error LNK2001: unresolved external symbol "__declspec(dllimpor
t) public: static void __cdecl boost::archive::detail::archive_serializer_map<cl
ass boost::archive::binary_iarchive>::erase(class boost::archive::detail::basic_
serializer const *)" (__imp_?erase@?$archive_serializer_map@Vbinary_iarchive@arc
hive@boost@@@detail@archive@boost@@SAXPBVbasic_serializer@234@@Z)
IxService.obj : error LNK2001: unresolved external symbol "__declspec(dllimport)
public: static void __cdecl boost::archive::detail::archive_serializer_map<clas
s boost::archive::binary_iarchive>::erase(class boost::archive::detail::basic_se
rializer const *)" (__imp_?erase@?$archive_serializer_map@Vbinary_iarchive@archi
ve@boost@@@detail@archive@boost@@SAXPBVbasic_serializer@234@@Z)
QxTransaction.obj : error LNK2001: unresolved external symbol "__declspec(dllimp
ort) public: static void __cdecl boost::archive::detail::archive_serializer_map<
class boost::archive::binary_iarchive>::erase(class boost::archive::detail::basi
c_serializer const *)" (__imp_?erase@?$archive_serializer_map@Vbinary_iarchive@a
rchive@boost@@@detail@archive@boost@@SAXPBVbasic_serializer@234@@Z)
QxSerialize_QImage.obj : error LNK2019: unresolved external symbol "__declspec(d
llimport) public: static void __cdecl boost::archive::detail::archive_serializer
_map<class boost::archive::binary_iarchive>::erase(class boost::archive::detail:
:basic_serializer const *)" (__imp_?erase@?$archive_serializer_map@Vbinary_iarch
ive@archive@boost@@@detail@archive@boost@@SAXPBVbasic_serializer@234@@Z) referen
ced in function "protected: __thiscall boost::archive::detail::pointer_iserializ
er<class boost::archive::binary_iarchive,class QImage>::~pointer_iserializer<cla
ss boost::archive::binary_iarchive,class QImage>(void)" (??1?$pointer_iserialize
r@Vbinary_iarchive@archive@boost@@VQImage@@@detail@archive@boost@@IAE@XZ)
QxSerialize_QObject.obj : error LNK2001: unresolved external symbol "__declspec(
dllimport) public: static void __cdecl boost::archive::detail::archive_serialize
r_map<class boost::archive::binary_iarchive>::erase(class boost::archive::detail
::basic_serializer const *)" (__imp_?erase@?$archive_serializer_map@Vbinary_iarc
hive@archive@boost@@@detail@archive@boost@@SAXPBVbasic_serializer@234@@Z)
QxSerialize_QPicture.obj : error LNK2001: unresolved external symbol "__declspec
(dllimport) public: static void __cdecl boost::archive::detail::archive_serializ
er_map<class boost::archive::binary_iarchive>::erase(class boost::archive::detai
l::basic_serializer const *)" (__imp_?erase@?$archive_serializer_map@Vbinary_iar
chive@archive@boost@@@detail@archive@boost@@SAXPBVbasic_serializer@234@@Z)
QxSerialize_QPixmap.obj : error LNK2001: unresolved external symbol "__declspec(
dllimport) public: static void __cdecl boost::archive::detail::archive_serialize
r_map<class boost::archive::binary_iarchive>::erase(class boost::archive::detail
::basic_serializer const *)" (__imp_?erase@?$archive_serializer_map@Vbinary_iarc
hive@archive@boost@@@detail@archive@boost@@SAXPBVbasic_serializer@234@@Z)
IxParameter.obj : error LNK2001: unresolved external symbol "__declspec(dllimpor
t) public: static bool __cdecl boost::archive::detail::archive_serializer_map<cl
ass boost::archive::binary_oarchive>::insert(class boost::archive::detail::basic
_serializer const *)" (__imp_?insert@?$archive_serializer_map@Vbinary_oarchive@a
rchive@boost@@@detail@archive@boost@@SA_NPBVbasic_serializer@234@@Z)
IxService.obj : error LNK2001: unresolved external symbol "__declspec(dllimport)
public: static bool __cdecl boost::archive::detail::archive_serializer_map<clas
s boost::archive::binary_oarchive>::insert(class boost::archive::detail::basic_s
erializer const *)" (__imp_?insert@?$archive_serializer_map@Vbinary_oarchive@arc
hive@boost@@@detail@archive@boost@@SA_NPBVbasic_serializer@234@@Z)
QxTransaction.obj : error LNK2001: unresolved external symbol "__declspec(dllimp
ort) public: static bool __cdecl boost::archive::detail::archive_serializer_map<
class boost::archive::binary_oarchive>::insert(class boost::archive::detail::bas
ic_serializer const *)" (__imp_?insert@?$archive_serializer_map@Vbinary_oarchive
@archive@boost@@@detail@archive@boost@@SA_NPBVbasic_serializer@234@@Z)
QxSerialize_QImage.obj : error LNK2019: unresolved external symbol "__declspec(d
llimport) public: static bool __cdecl boost::archive::detail::archive_serializer
_map<class boost::archive::binary_oarchive>::insert(class boost::archive::detail
::basic_serializer const *)" (__imp_?insert@?$archive_serializer_map@Vbinary_oar
chive@archive@boost@@@detail@archive@boost@@SA_NPBVbasic_serializer@234@@Z) refe
renced in function "public: __thiscall boost::archive::detail::pointer_oserializ
er<class boost::archive::binary_oarchive,class QImage>::pointer_oserializer<clas
s boost::archive::binary_oarchive,class QImage>(void)" (??0?$pointer_oserializer
@Vbinary_oarchive@archive@boost@@VQImage@@@detail@archive@boost@@QAE@XZ)
QxSerialize_QObject.obj : error LNK2001: unresolved external symbol "__declspec(
dllimport) public: static bool __cdecl boost::archive::detail::archive_serialize
r_map<class boost::archive::binary_oarchive>::insert(class boost::archive::detai
l::basic_serializer const *)" (__imp_?insert@?$archive_serializer_map@Vbinary_oa
rchive@archive@boost@@@detail@archive@boost@@SA_NPBVbasic_serializer@234@@Z)
QxSerialize_QPicture.obj : error LNK2001: unresolved external symbol "__declspec
(dllimport) public: static bool __cdecl boost::archive::detail::archive_serializ
er_map<class boost::archive::binary_oarchive>::insert(class boost::archive::deta
il::basic_serializer const *)" (__imp_?insert@?$archive_serializer_map@Vbinary_o
archive@archive@boost@@@detail@archive@boost@@SA_NPBVbasic_serializer@234@@Z)
QxSerialize_QPixmap.obj : error LNK2001: unresolved external symbol "__declspec(
dllimport) public: static bool __cdecl boost::archive::detail::archive_serialize
r_map<class boost::archive::binary_oarchive>::insert(class boost::archive::detai
l::basic_serializer const *)" (__imp_?insert@?$archive_serializer_map@Vbinary_oa
rchive@archive@boost@@@detail@archive@boost@@SA_NPBVbasic_serializer@234@@Z)
IxParameter.obj : error LNK2001: unresolved external symbol "__declspec(dllimpor
t) public: static void __cdecl boost::archive::detail::archive_serializer_map<cl
ass boost::archive::binary_oarchive>::erase(class boost::archive::detail::basic_
serializer const *)" (__imp_?erase@?$archive_serializer_map@Vbinary_oarchive@arc
hive@boost@@@detail@archive@boost@@SAXPBVbasic_serializer@234@@Z)
IxService.obj : error LNK2001: unresolved external symbol "__declspec(dllimport)
public: static void __cdecl boost::archive::detail::archive_serializer_map<clas
s boost::archive::binary_oarchive>::erase(class boost::archive::detail::basic_se
rializer const *)" (__imp_?erase@?$archive_serializer_map@Vbinary_oarchive@archi
ve@boost@@@detail@archive@boost@@SAXPBVbasic_serializer@234@@Z)
QxTransaction.obj : error LNK2001: unresolved external symbol "__declspec(dllimp
ort) public: static void __cdecl boost::archive::detail::archive_serializer_map<
class boost::archive::binary_oarchive>::erase(class boost::archive::detail::basi
c_serializer const *)" (__imp_?erase@?$archive_serializer_map@Vbinary_oarchive@a
rchive@boost@@@detail@archive@boost@@SAXPBVbasic_serializer@234@@Z)
QxSerialize_QImage.obj : error LNK2019: unresolved external symbol "__declspec(d
llimport) public: static void __cdecl boost::archive::detail::archive_serializer
_map<class boost::archive::binary_oarchive>::erase(class boost::archive::detail:
:basic_serializer const *)" (__imp_?erase@?$archive_serializer_map@Vbinary_oarch
ive@archive@boost@@@detail@archive@boost@@SAXPBVbasic_serializer@234@@Z) referen
ced in function "public: __thiscall boost::archive::detail::pointer_oserializer<
class boost::archive::binary_oarchive,class QImage>::~pointer_oserializer<class
boost::archive::binary_oarchive,class QImage>(void)" (??1?$pointer_oserializer@V
binary_oarchive@archive@boost@@VQImage@@@detail@archive@boost@@QAE@XZ)
QxSerialize_QObject.obj : error LNK2001: unresolved external symbol "__declspec(
dllimport) public: static void __cdecl boost::archive::detail::archive_serialize
r_map<class boost::archive::binary_oarchive>::erase(class boost::archive::detail
::basic_serializer const *)" (__imp_?erase@?$archive_serializer_map@Vbinary_oarc
hive@archive@boost@@@detail@archive@boost@@SAXPBVbasic_serializer@234@@Z)
QxSerialize_QPicture.obj : error LNK2001: unresolved external symbol "__declspec
(dllimport) public: static void __cdecl boost::archive::detail::archive_serializ
er_map<class boost::archive::binary_oarchive>::erase(class boost::archive::detai
l::basic_serializer const *)" (__imp_?erase@?$archive_serializer_map@Vbinary_oar
chive@archive@boost@@@detail@archive@boost@@SAXPBVbasic_serializer@234@@Z)
QxSerialize_QPixmap.obj : error LNK2001: unresolved external symbol "__declspec(
dllimport) public: static void __cdecl boost::archive::detail::archive_serialize
r_map<class boost::archive::binary_oarchive>::erase(class boost::archive::detail
::basic_serializer const *)" (__imp_?erase@?$archive_serializer_map@Vbinary_oarc
hive@archive@boost@@@detail@archive@boost@@SAXPBVbasic_serializer@234@@Z)
QxSerialize_QPicture.obj : error LNK2019: unresolved external symbol "__declspec
(dllimport) public: class QPicture & __thiscall QPicture::operator=(class QPictu
re &&)" (__imp_??4QPicture@@QAEAAV0@$$QAV0@@Z) referenced in function "void __cd
ecl boost::serialization::qx_load<class boost::archive::binary_iarchive>(class b
oost::archive::binary_iarchive &,class QPicture &,unsigned int)" (??$qx_load@Vbi
nary_iarchive@archive@boost@@@serialization@boost@@YAXAAVbinary_iarchive@archive
@1@AAVQPicture@@I@Z)
QxSerialize_QString.obj : error LNK2019: unresolved external symbol "__declspec(
dllimport) public: static class QString __cdecl QString::fromStdString(class std
::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > c
onst &)" (__imp_?fromStdString@QString@@SA?AV1@ABV?$basic_string@DU?$char_traits
@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "public: static class
QString __cdecl qx::trait::archive_wide_traits<class boost::archive::xml_iarchiv
e>::cvtQString<0,0>::toQString(class std::basic_string<char,struct std::char_tra
its<char>,class std::allocator<char> > const &)" (?toQString@?$cvtQString@$0A@$0
A@@?$archive_wide_traits@Vxml_iarchive@archive@boost@@@trait@qx@@SA?AVQString@@A
BV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
QxSerialize_QUuid.obj : error LNK2019: unresolved external symbol "__declspec(dl
limport) public: __thiscall QUuid::QUuid(class QString const &)" (__imp_??0QUuid
@@QAE@ABVQString@@@Z) referenced in function "void __cdecl boost::serialization:
:qx_load<class boost::archive::binary_iarchive>(class boost::archive::binary_iar
chive &,struct QUuid &,unsigned int)" (??$qx_load@Vbinary_iarchive@archive@boost
@@@serialization@boost@@YAXAAVbinary_iarchive@archive@1@AAUQUuid@@I@Z)
QxSerialize_QVariant.obj : error LNK2019: unresolved external symbol "__declspec
(dllimport) public: class QRegExp & __thiscall QRegExp::operator=(class QRegExp
&&)" (__imp_??4QRegExp@@QAEAAV0@$$QAV0@@Z) referenced in function "void __cdecl
boost::serialization::qx_save<class boost::archive::binary_oarchive>(class boost
::archive::binary_oarchive &,class QVariant const &,unsigned int)" (??$qx_save@V
binary_oarchive@archive@boost@@@serialization@boost@@YAXAAVbinary_oarchive@archi
ve@1@ABVQVariant@@I@Z)
debug\QxOrmd.dll : fatal error LNK1120: 70 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\BIN\link.EXE"' : return code '0x460'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\BIN\nmake.exe"' : return code '0x2'
Stop.

E:\QxOrm>cd "./debug/"

E:\QxOrm\debug>copy "QxOrmd.lib" "../lib/"
已复制 1 个文件。

E:\QxOrm\debug>copy "QxOrmd.dll" "../lib/"
系统找不到指定的文件。

E:\QxOrm\debug>copy "QxOrmd.lib" "../test/_bin/"
已复制 1 个文件。

E:\QxOrm\debug>copy "QxOrmd.dll" "../test/_bin/"
系统找不到指定的文件。
Guest
 

Re: I need static library of QxOrm

Postby magicu » Mon Jan 30, 2012 3:40 am

Sorry, I missed a setp in the last post.

I built QxOrm with static Qt, for it generate Makefile.Debug like

CFLAGS = -nologo -Zm200 -Zi -MTd -W3 $(DEFINES)
CXXFLAGS = -nologo -Zm200 -Zi -MTd -GR -EHsc -W3 -w34100 -w34189 $(DEFINES)

Otherwise shared Qt will generate Makefile.Debug like

CFLAGS = -nologo -Zm200 -Zi -MDd -W3 $(DEFINES)
CXXFLAGS = -nologo -Zm200 -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 $(DEFINES)

That's incorrect.

So, I use "E:\QxOrm>tools\_build_debug.bat" to build QxOrm with static Qt, then get many errors.
magicu
 
Posts: 54
Joined: Fri Jan 20, 2012 9:51 am

Re: I need static library of QxOrm

Postby QxOrm admin » Mon Jan 30, 2012 9:39 am

I think that there is something missing into QxOrm.pri (or .pro) file to say that you are using Qt (and boost serialization) into static mode (reading qglobal.h file from Qt library, it seems that "QT_SHARED" must not be defined using static library).
You will find more help about it into Qt forums and boost forums than here (or into qmake documentation)...

Maybe the first thing to do for you is to create a simple project, and try to link it statically only with Qt.
Then, when it will work, try to add a dependency to boost serialization into your simple project.
Then, when your simple project will work correctly with Qt and boost statically linked, we could take a look at QxOrm library... ;)
QxOrm admin
 

Re: I need static library of QxOrm

Postby magicu » Mon Jan 30, 2012 10:13 am

QxOrm admin wrote:I think that there is something missing into QxOrm.pri (or .pro) file to say that you are using Qt (and boost serialization) into static mode (reading qglobal.h file from Qt library, it seems that "QT_SHARED" must not be defined using static library).
You will find more help about it into Qt forums and boost forums than here (or into qmake documentation)...

Maybe the first thing to do for you is to create a simple project, and try to link it statically only with Qt.
Then, when it will work, try to add a dependency to boost serialization into your simple project.
Then, when your simple project will work correctly with Qt and boost statically linked, we could take a look at QxOrm library... ;)



I'm sure there is no problem with my static QT and Boost. I use these to build static applcation for a long time.
magicu
 
Posts: 54
Joined: Fri Jan 20, 2012 9:51 am

Re: I need static library of QxOrm

Postby QxOrm admin » Mon Jan 30, 2012 10:24 am

I'm sure there is no problem with my static QT and Boost. I use these to build static applcation for a long time.

How do you indicate to your application compilation process that you are using Qt and boost into static mode ?
It is necessary because _declspec (dllimport) and _declspec(dllexport) must not be defined in this case (cf. 'qglobal.h' file from Qt library, and "QT_SHARED" variable).
It must exist an instruction to put into *.pro file, but I don't know it.
QxOrm admin
 

Re: I need static library of QxOrm

Postby magicu » Mon Jan 30, 2012 11:55 am

QxOrm admin wrote:
I'm sure there is no problem with my static QT and Boost. I use these to build static applcation for a long time.

How do you indicate to your application compilation process that you are using Qt and boost into static mode ?
It is necessary because _declspec (dllimport) and _declspec(dllexport) must not be defined in this case (cf. 'qglobal.h' file from Qt library, and "QT_SHARED" variable).
It must exist an instruction to put into *.pro file, but I don't know it.


I build a simple application that link with static QT(qtmaind.lib, QtCored.lib) and static boost(libboost_serialization-vc100-mt-gd-1_48.lib). After that, I get a single exe which can run at anywhere. If the forum can upload attachment, I can show more clear.


BTW. In order to build static QT, I modified "mkspecs\win32-msvc2010\qmake.conf" as:

QMAKE_CFLAGS_RELEASE = -O2 -MT
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MT -Zi
QMAKE_CFLAGS_DEBUG = -Zi -MTd

And compile with command "configure -debug-and-release -static -nomake examples -nomake demos -no-qt3support -no-webkit" successfully. So, I think there is no problem with my library.
magicu
 
Posts: 54
Joined: Fri Jan 20, 2012 9:51 am

Re: I need static library of QxOrm

Postby QxOrm admin » Mon Jan 30, 2012 1:11 pm

I build a simple application that link with static QT(qtmaind.lib, QtCored.lib)

Do you try also to link QtSqld.lib with your simple application ?
Because your logger error displays errors only with classes from QtSql module :
- error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QSqlQuery::QSqlQuery(class QSqlDatabase)"
- error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall QSqlDatabase::isValid(void)const "
- error LNK2019: unresolved external symbol "__declspec(dllimport) public: class QString __thiscall QSqlError::databaseText(void)const "
- error LNK2019: unresolved external symbol "__declspec(dllimport) public: class QString __thiscall QSqlError::driverText(void)const "
- error LNK2019: unresolved external symbol "__declspec(dllimport) public: class QVariant __thiscall QSqlQuery::value(int)const "


Then, you have errors about boost serialization, but we have to resolve problems step by step...
QxOrm admin
 

Re: I need static library of QxOrm

Postby magicu » Mon Jan 30, 2012 1:38 pm

QxOrm admin wrote:
I build a simple application that link with static QT(qtmaind.lib, QtCored.lib)

Do you try also to link QtSqld.lib with your simple application ?
Because your logger error displays errors only with classes from QtSql module :
- error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QSqlQuery::QSqlQuery(class QSqlDatabase)"
- error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall QSqlDatabase::isValid(void)const "
- error LNK2019: unresolved external symbol "__declspec(dllimport) public: class QString __thiscall QSqlError::databaseText(void)const "
- error LNK2019: unresolved external symbol "__declspec(dllimport) public: class QString __thiscall QSqlError::driverText(void)const "
- error LNK2019: unresolved external symbol "__declspec(dllimport) public: class QVariant __thiscall QSqlQuery::value(int)const "


Then, you have errors about boost serialization, but we have to resolve problems step by step...



There is still no problem when I linked QtSqld.lib.

1>ClCompile:
1> moc_test5.cpp
1> main.cpp
1> test5.cpp
1> Generating Code...
1> qrc_test5.cpp
1>Link:
1> test5.vcxproj -> c:\users\howard\documents\visual studio 2010\Projects\test5\test5.exe
1>FinalizeBuildStatus:
1> Deleting file "Debug\test5.unsuccessfulbuild".
1> Touching "Debug\test5.lastbuildstate".
1>
1>Build succeeded.
1>
1>Time Elapsed 00:00:24.90
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========


This is the list of linked libraries.

kernel32.lib;user32.lib;shell32.lib;uuid.lib;ole32.lib;advapi32.lib;ws2_32.lib;gdi32.lib;comdlg32.lib;oleaut32.lib;imm32.lib;winmm.lib;winspool.lib;qtmaind.lib;QtCored.lib;QtGuid.lib;QtSqld.lib;libboost_serialization-vc100-mt-gd-1_48.lib;%(AdditionalDependencies)
magicu
 
Posts: 54
Joined: Fri Jan 20, 2012 9:51 am

Next

Return to QxOrm - Feature request

Who is online

Users browsing this forum: No registered users and 2 guests

cron