[odb-users] odb on windows platform

luca paganotti luca.paganotti at gmail.com
Fri May 13 09:13:16 EDT 2022

Hi all,

I'm trying to setup a development environment to use odb compiler possibly
with boost profile and date-time profile an to connect to MS Sql Server
databases. I'm using VisualStudio 2019. I would like to build for 32 bit
and 64 bit architecture.

I woud like to use boost 1.78.

I downloaded libodb-2.4.0.zip, libodb-boost-2.4.0.zip,
libodb-mssql-2.4.0.zip and odb-2.4.0-i686-windows.zip.
All these files were decompressed at the same directory folder level and
each one of them in a proper subfolder.

Let's say that subfolders libodb-2.4.0, libodb-boost-2.4.0,
libodb-mssql-2.4.0 are all in c:\root folder and that the boost
distribution is in C:\root\boost_1_78_0\x32 for the x32 boost distribution
and C:\root\boost_1_78_0\x64 for the x64 one, each one with the
usual folder tree.

I wrote a simple .hxx file containing the definition of a db object, let's
this be karla_entities.hxx

When I issue the command from the folder containing the .hxx file:

odb.exe --std c++11 -I"C:\root\libodb-2.4.0" -I"C:\root\boost_1_78_0\x32"
--database mssql --profile boost/smart-ptr -q -e karla_entities.hxx

I got this error:

In file included from
                 from C:\root\boost_1_78_0\x32/boost/config.hpp:44,
                 from C:\root\boost_1_78_0\x32/boost/shared_ptr.hpp:17,
                 from karla_entities.hxx:14:
C:\root\libodb-2.4.0/version:1:1: error: too many decimal points in number

and then a bunch of other errors that i can reproduce if needed. Do I need
some specific definition (-D ) when calling odb.exe?

So my question is: how do I setup a correct environment to be able to use
odb.exe and then to link against libodb-2.4.0, libodb-boost-2.4.0 and

I will try now with the person example that is in the manual.

I searched also among the examples in odb-examples-2.4.0.zip but I didn't
find any example call to odb.exe in order to generate the "glue" database
code. Probably it's a trivial mistake by my side but currently I'm not able
to get it.

Any help will be appreciated.


-- Dott. Ing. Luca Paganotti
-- Via Baroffio 4
-- 21040 Vedano Olona (VA)
-- 393 1346898
-- softech s.r.l. email:
-- luca.paganotti at softechweb.it
-- luca.paganotti at gmail.com
-- https://github.com/lucapaganotti
-- sourceforge email:
-- lucapaganotti at users.sourceforge.net
-- skype name: luca.paganotti
[image: http://it.linkedin.com/in/lucapaganotti]
-- ---------------------------------------------------------------
-- Mistakes are portals of discovery - JAAJ
--- --------------------------------------------------------------

More information about the odb-users mailing list