[odb-users] How to build odb.exe

Feiyun Wang feiyunw at yahoo.com
Mon Jun 4 00:30:21 EDT 2018


Hi,
When i mixed odb-2.4.0-i686-windows\bin\odb.exe with other ODB components built from the git source, I got a compiler error in file person-odb.hxx when building the odb-examples\hello:
````
#if (ODB_VERSION != 20400UL)
#error ODB runtime version mismatch
#endif
````
After commenting out the #error statement, I got a linking error finally:
````
1>------ Build started: Project: hello, Configuration: Debug x64 ------
1>driver.obj : error LNK2001: unresolved external symbol "struct odb::details::share odb::details::shared" (?shared at details@odb@@3Ushare at 12@A)
1>person-odb.obj : error LNK2001: unresolved external symbol "struct odb::details::share odb::details::shared" (?shared at details@odb@@3Ushare at 12@A)
1>G:\prj\odb\odb-examples\hello\x64\Debug\hello.exe : fatal error LNK1120: 1 unresolved externals
1>Done building project "hello.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
````
I guess that odb.exe version 2.4.0 may not work well with the latest ODB git source?
But when I tried to build odb.exe from the git repo:
````
G:\prj\odb>mkdir odb-vs2017G:\prj\odb>b config.cxx=cl config.cli=C:\build2\bin\cli.exe config.cc.coptions="
/O2" config.import.libstudxml=libstudxml-vs2017/ config.import.libcutl=libcutl-v
s2017/ "configure(odb/@odb-vs2017/)"
save odb-vs2017\build\config.buildG:\prj\odb>cd odb-vs2017G:\prj\odb\odb-vs2017>b install
mkdir fsdir{odb\}
mkdir odb\fsdir{relational\}
mkdir odb\relational\fsdir{mssql\}
 33 targets to update (for install)
G:\prj\odb\odb-vs2017>
````
It turns out that odb.exe is not properly configured, and cannot be compiled and installed.
Any hints?
Sincerely,
Feiyun Wang


More information about the odb-users mailing list