[odb-users] Re: odb-users Digest, Vol 167, Issue 3

Gilles BENE POUGOUE gilles.benepougoue at gmail.com
Sun Oct 6 01:10:24 EDT 2024


Hi ,
Regarding your issue on using odb without g++.exe on Windows, I think it
may not be possible because odb works as a frontend for g++ , invoking it
in the compilation process on your database files (entity classes) to
generate the AST that it needs to reason about your code. It then uses it
to generate c++ code (*-odb.hxx) that is automatically passed to msvc
cl.exe.

It uses the plugging support of g++ to do all this magic. I don't think
it's a feature provided by msvc


On Sat, Oct 5, 2024, 17:00 <odb-users-request at codesynthesis.com> wrote:

> Send odb-users mailing list submissions to
>         odb-users at codesynthesis.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://codesynthesis.com/mailman/listinfo/odb-users
> or, via email, send a message with subject or body 'help' to
>         odb-users-request at codesynthesis.com
>
> You can reach the person managing the list at
>         odb-users-owner at codesynthesis.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of odb-users digest..."
>
>
> Today's Topics:
>
>    1. Question regarding ODB on windows without gcc compiler
>       (DEMBROGE Michael)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 4 Oct 2024 22:43:09 +0000
> From: DEMBROGE Michael <michael.dembroge at leica-geosystems.com>
> Subject: [odb-users] Question regarding ODB on windows without gcc
>         compiler
> To: "odb-users at codesynthesis.com" <odb-users at codesynthesis.com>
> Message-ID:
>         <
> AS8PR06MB810289E992378FB976C45BFDB9722 at AS8PR06MB8102.eurprd06.prod.outlook.com
> >
>
> Content-Type: text/plain; charset="us-ascii"
>
> Hello Boris,
>
> I'm unable to produce a version of the ODB compiler on a Windows system
> with no dependency on the g++ compiler. The issue is that the odb compiler
> must be built with a gcc compiler (see error message below in red). But,
> building the odb compiler using gcc as the compiler (i.e. "config.cxx=g++")
> creates a dependency on g++.exe which is not available on Windows.
>
> Here is an overview of my steps:
>
>   1.  install build2 using the build2-install-msvc-0.17.0.bat file.
>   2.  Build odb compiler using the following commands:
>      *   bpkg create -d odb-msvc cc config.cxx=cl config.cc.coptions=-O2
> config.install.root=d:\odb
>      *   cd odb-msvc
>      *   odb-msvc> bpkg build odb at https://pkg.cpget.org/1/beta<mailto:odb@
> https://pkg.cpget.org/1/beta>
>      *   bpkg install odb
>
>
> I get the following error due to passing visual studio's "cl" as the
> compiler:
> db-2.5.0-b.27\build\root.build:51:5: error: ODB compiler can only be built
> with GCC
>
> So, I then reinstalled build2 using the build2-install-mingw-0.17.0.bat
> followed by these steps:
>
>   1.  Build odb compiler using the following command:
>   2.  D:\odb-build>bpkg create -d odb-mingw cc config.cxx=g++
> config.cc.coptions=-O2 config.install.root=c:\odb
>   3.  D:\odb-build>cd odb-mingw
>   4.  D:\odb-build>bpkg build odb at https://pkg.cppget.org/1/beta<mailto:
> odb at https://pkg.cppget.org/1/beta>
>   5.  D:\odb-build>bpkg install odb
>
>
> Then, as a test, I tried to run the odb compiler manually from it's local
> bin folder and I get the following error message:
> C:\odb\bin>odb.exe --std c++17 --database sqlite
> g++: error: file not found
>
> I realize that installing build2 via the mingw-based .bat file will
> generate g++.exe in the build2/bin folder, but we are not supposed to be
> dependent on build/bin. Odb.exe should run in the target /bin folder as a
> standalone. This is consistent with the error message we get when we try to
> build our project in Visual Studio. It's complaining the g++.exe cannot be
> found.
>
> Any ideas?
>
> Thank you in advance,
>
> Mike Dembroge
> Leica Geosystems
>
>
> ------------------------------
>
> _______________________________________________
> odb-users mailing list
> odb-users at codesynthesis.com
> https://codesynthesis.com/mailman/listinfo/odb-users
>
>
> End of odb-users Digest, Vol 167, Issue 3
> *****************************************
>


More information about the odb-users mailing list