[freetds] mingw cross compilation (Frediano Ziglio)
Thomas Stover
thomas at wsinnovations.com
Sun Jan 11 17:56:02 EST 2009
Date: Sun, 11 Jan 2009 14:06:51 +0100
> From: "Frediano Ziglio" <freddy77 at gmail.com>
> Subject: Re: [freetds] mingw cross compilation
> To: "FreeTDS Development Group" <freetds at lists.ibiblio.org>
>
>
> What a confusion...
>
> --prefix is FreeTDS installation directory so it's wrong
> --includedir is FreeTDS include installation directory so it's wrong
> You don't have to define CC but tell configure script where to find
> proper compiler so you have to add to PATH path to your cross compiler
> and use just
>
> $ ./configure --host=i686-mingw32
>
> configure search for executable like i686-mingw32-gcc (gcc, ld, g++,
> nm, objdump, windres in this case and so on). So defining only CC
> can't work. The no that is called is caused by not finding
> i686-mingw32-windres (or just a windres).
>
> freddy77
>
1) Yes! finally! A native win64 version of my C module. Currently win32
- msdblib, linux32/linux64/win64 - freetds! You can always count on
"good old open source", to come to the rescue from windows. This saves
me a boatload of problems. Thanks freetds!
2) Yes I should have been more clear. The --prefix and --includedir were
intentional, as I wanted to place the build output in a place with all
the other related cross compiler stuff.
3) The magic touch was the PATH, not CC. I have never understood until
now that the --host thing is just looking for tool prefixes. Thanks man!
4) --enable-shared seems to not yield a dll. Although this is not a
technical problem, is this still in the spirit of LGPL?
5) For google search posterity sake, kids try something like:
PATH=$PATH:/path/to/your/toolchain/bin ./configure --host=toolchain_prefix
(where "toolchain_prefix" is the part of the filenames (not including
the '-') like toolchain-prefix-gcc and toolchanin-prefix-g++)
PATH=$PATH:/path/to/your/toolchain/bin make
Also once back over in windows, set your FREETDS environment variable to
the directory containing freetds.conf.
More information about the FreeTDS
mailing list