[odb-users] Re: odb on windows platform

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


ok, running odb.exe this way

odb.exe --std c++11
-IC:\dev\softech\sara5\saraserver\server\vcc\tools\karla2sara\libs\boost_1_78_0\x32
--profile boost/smart-ptr --database mssql --generate-query
--generate-session karla_entities.hxx

generates the some files, now I should be able to use
karla-entities-odb.?xx in my code and linking against the desired libraries.

Sorry for the noise.


----------------------------------------------------------------
-- 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]
<http://it.linkedin.com/in/lucapaganotti>
-- ---------------------------------------------------------------
-- Mistakes are portals of discovery - JAAJ
--- --------------------------------------------------------------


On Fri, May 13, 2022 at 3:13 PM luca paganotti <luca.paganotti at gmail.com>
wrote:

> 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
> C:\root\boost_1_78_0\x32/boost/config/detail/select_stdlib_config.hpp:24:0,
>                  from C:\root\boost_1_78_0\x32/boost/config.hpp:44,
>                  from
> C:\root\boost_1_78_0\x32/boost/smart_ptr/bad_weak_ptr.hpp:20,
>                  from
> C:\root\boost_1_78_0\x32/boost/smart_ptr/detail/shared_count.hpp:25,
>                  from
> C:\root\boost_1_78_0\x32/boost/smart_ptr/shared_ptr.hpp:17,
>                  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
>  2.4.0
>  ^
>
> 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
> libodb-mssql-2.4.0?
>
> 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.
>
> Thanks.
>
> ----------------------------------------------------------------
> -- 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]
> <http://it.linkedin.com/in/lucapaganotti>
> -- ---------------------------------------------------------------
> -- Mistakes are portals of discovery - JAAJ
> --- --------------------------------------------------------------
>


More information about the odb-users mailing list