[odb-users] Compiling ODB with /MTd
Boris Kolpackov
boris at codesynthesis.com
Thu Mar 20 09:15:33 EDT 2014
Hi Erez,
Please do not remove odb-users at codesynthesis.com from To/Cc.
Erez GB <erezgb at walla.com> writes:
> Thank you for your reply, following your advice I changed all
> projects to /MTd, changed the output lib
>
> and replaced the preprocessor declares to define static lib.
>
>
> However I get many unresolved externals errors and cannot link
> an use them,
My guess would be that you are not building your application
with LIBODB_STATIC_LIB and LIBODB_SQLITE_STATIC_LIB defines.
Boris
[The rest of the email follows for context.]
> here are the declares I use:
>
>
> project : libodb-vc11
>
>
> WIN32
>
> _DEBUG
>
> _WINDOWS
>
> _USRDLL
>
> LIBODB_STATIC_LIB
>
>
>
> project : libodb-sqlite-vc11
>
>
> WIN32
>
> _DEBUG
>
> _WINDOWS
>
> _USRDLL
>
> LIBODB_SQLITE_STATIC_LIB
>
> LIBODB_STATIC_LIB
>
> LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY
>
>
> [I tries both with and without _USRDLL]
>
>
> (Also please note that libodb-sqlite-vc11 project is using 2 defines, one in \
> odb\details\export.hxx and the other in \odb\sqlite\details\export.hxx)
>
>
>
> Can you please see if I am missing something ?
>
>
> Thank you, bellow I added a list of some of the errors I get.
>
>
> Erez.
>
> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
> 1>Framework-static-d.lib(IndividualMainData-odb.obj) : warning LNK4217: locally
> defined symbol ??1delete_statement at sqlite@odb@@UAE at XZ (public: virtual
> __thiscall odb::sqlite::delete_statement::~delete_statement(void)) imported in
> function "public: virtual void * __thiscall odb::sqlite::delete_statement::
> `scalar deleting destructor'(unsigned int)" (??
> _Gdelete_statement at sqlite@odb@@UAEPAXI at Z)
> 1>Framework-static-d.lib(PlaceMainData-odb.obj) : warning LNK4049: locally
> defined symbol ??1delete_statement at sqlite@odb@@UAE at XZ (public: virtual
> __thiscall odb::sqlite::delete_statement::~delete_statement(void)) imported
> 1>Framework-static-d.lib(FactMainData-odb.obj) : warning LNK4049: locally
> defined symbol ??1delete_statement at sqlite@odb@@UAE at XZ (public: virtual
> __thiscall odb::sqlite::delete_statement::~delete_statement(void)) imported
> 1>Framework-static-d.lib(NoteMainData-odb.obj) : warning LNK4049: locally
> defined symbol ??1delete_statement at sqlite@odb@@UAE at XZ (public: virtual
> __thiscall odb::sqlite::delete_statement::~delete_statement(void)) imported
> 1>Framework-static-d.lib(IndividualFactsMgr.obj) : error LNK2001: unresolved
> external symbol "__declspec(dllimport) public: __thiscall
> odb::object_not_persistent::object_not_persistent(void)" (__imp_??
> 0object_not_persistent at odb@@QAE at XZ)
> 1>Framework-static-d.lib(NoteMainData-odb.obj) : error LNK2019: unresolved
> external symbol "__declspec(dllimport) public: __thiscall
> odb::object_not_persistent::object_not_persistent(void)" (__imp_??
> 0object_not_persistent at odb@@QAE at XZ) referenced in function "public: __thiscall
> std::_Iostream_error_category::_Iostream_error_category(void)" (??
> 0_Iostream_error_category at std@@QAE at XZ)
More information about the odb-users
mailing list