I've got a Linux app that includes some of our own Tcl extensions and
some "teapot" extensions; it's wrapped using TclDevKit, and is based
on ActiveTcl basekits. I've got to port it to Windows. I'd prefer to
continue using the same tools I'm using now, which is to say, gcc,
make, and emacs.
I've installed MinGW and MSYS, which look like a good start; however,
the msys shell wants to use its own funky Unix-like path names, i.e., /
home/will maps to something like C:\mingw\msys\home\will, or something
like that. My build process uses a number of Tcl scripts, which will
work against the normal Windows file system; and Win32 Emacs also uses
the normal Windows file system. To use MSYS, then, it would seem that
you have to be kind of schizophrenic. Can anyone point me at any
documentation that talks about how the path translation works, and
what to do about it?
And is there a better choice than MinGW for this?
Thanks!
The one thing to watch out for in my experience is that gnu make is a
lot more finicky, avoid spaces in file paths, for example, at all
costs.
/Ashok
Wouldn't it be a choice to use gcc to cross-compile the Windows
extension on a Linux host which has ready all the installed sources for
your application?
I am using Critcl or Cmake for cross-compiling Windows extensions and
mingw32 and mingw64 are doing their job perfectly to create 32-bit and
64bit dlls.
Aha! There's more magic going on here than I realized. I just tried
this, and of course it works; and I CD'd to a directory outside the
MSYS /home tree, and asked Emacs to load up a file in that directory,
and it worked perfectly. I suspect there are still some gotchas I'll
need to work through, but this is promising.
> The one thing to watch out for in my experience is that gnu make is a
> lot more finicky, avoid spaces in file paths, for example, at all
> costs.
I do anyway; spaces in file names make command line operation more
difficult, and as a developer I'm a command-line kind of guy.
Thanks very much!
I'll keep that in mind. Thanks!
msys/mingw is a good way to go. Aside from the other notes in this
thread, I just wanted to add that TEA actually groks being run under
msys/mingw just fine. The only part I find tricky is generating the
configure on Windows (I usually do it on Linux, then use same
configure across all platforms).
Jeff
> Date: Fri, 8 Jul 2011 12:44:51 -0700 (PDT)
> From: Jeff Hobbs <jeff....@gmail.com>
> Newsgroups: comp.lang.tcl
> Subject: Re: Building Tcl extensions on Windows 7
The MingW32 port in the FreeBSD ports also works very well to cross
compile Tcl/Tk (and extensions) for Windows. As long as the correct
compiler is specified, and the ./configure is set to cross-compile, all is
well.
Cheers,
Rob.
I have successfully compiled many things using both mingw/msys and the
mingw32 cross compiler on linux. Mingw/msys works well but for large
sources is very slow. The cross compiler under linux seems much
faster, so if build time is critical to you than bear that option in
mind. Of course the benefit of msys is you can easily test and run
stuff as it is built. With the cross compiler, you can try to compile
executables and dlls into a shared path of a virtualbox with windows
on it. I also find myself doing that quite a bit.
Cheers
Bob
Most of the app is in pure Tcl; we have a few small C extensions, so
compilation time isn't a big deal. Cross-compiling into a virtualbox
shared path is appealing, although since we're likely not to be
delivering on Linux in the long-run I'm probably better off just doing
it on Windows.
Thanks to all who have answered!