[odb-users] Re: ODB windows custom build

Boris Kolpackov boris at codesynthesis.com
Tue Jul 31 09:47:52 EDT 2012


Hi Keenan,

In the future please send technical questions like these to the
odb-users mailing list (which I've CC'ed) instead of to me directly,
as discussed in the posting guidelines:

http://www.codesynthesis.com/support/posting-guidelines.xhtml

Keenan Carter <klc2572 at students.kennesaw.edu> writes:

> Thank you for making great software. It inspires me.

Thanks, I am glad you like it!


> I am a student at Kennesaw State University. I am working on a project and
> using odb source code as the study for my project. I understand that it is
> very hard to build on windows, but I "absolutely must" build it on windows
> myself for my project.
> 
> Could you please tell me or sent me all the steps I need to do the "custom
> build" on windows using the your MingW custom tool chain, ect...

While I cannot give you "all the steps", I can give you an overview and
point you to the scripts we use. You can then study them and hopefully
be able to build ODB for Windows yourself. You can also ask more specific
questions (on the odb-users mailing list).

Ok, the overview: GCC currently doesn't support dynamic plugins on Windows
because of the limitations of Windows DLL architecture. To overcome this,
we make a custom build of GCC that has the ODB plugin statically linked
to the GCC compiler executable. This requires a small patch to the GCC
source code. Note also that the standard GCC plugin mechanism is still
used. It is just the dynamic loading that we side-step (that's why the
patch is so small).

Here at Code Synthesis we cross-compile ODB for Windows using a Linux-to-
MinGW cross-compiler. This is mainly for convenience (I can build ODB for
Windows from my workspace, for example, for testing) as well as speed.
But, you should be able to do the same on Windows using the MinGW/MSYS
toolchain.

All the scripts, patches, etc., that we use to build ODB for Windows are
available in the binary/mingw/ subdirectory in the odb-etc module:

http://scm.codesynthesis.com/?p=odb/odb-etc.git;a=summary

Some notable files in this directory:

gcc-4.5.1-static-plugin.patch
  That's the GCC patch I mentioned above.

build-dist
  This scripts is what we call to build the ODB distribution for Windows.
  It builds ODB, GCC, runtime libraries, and packages everything.

gcc-configure
  This scripts configures GCC to link the plugin statically.

Boris



More information about the odb-users mailing list