[Xcircuit-dev] Windows Tcl build using mingw64 gcc

Tim Edwards tim at opencircuitdesign.com
Thu Mar 29 11:43:27 EDT 2012

Hello Tomas,

> I continued yesterdays work by taking the path of building xcircuit 
> using a mingw64 gcc compiler.
> It is rather untested but works better than my previous build. (Can now 
> add more than 30 caps:) I know at least one error: Can't import a 
> background ps-picture.

The background postscript rendering has always been flaky at best.  I
have long ago stopped using it and instead convert to a graphics image
and import, because it's more reliable.  So it is not necessarily a
porting issue.

It's flaky enough that I should probably separate out the feature
with #ifdef...#endif blocks and disable it by default in the configuration.

> I will try out some tutorials and then come back with some info. At 
> least this build process is far simpler then the one using the Windows SDK.

That's good to know.

> Perhaps the 64-bit target is a too big step to take at the moment. 
> Perhaps the mingw32 environment is simpler. I have spotted a potential 
> issue with casting (void*) into (int). This is ok when (void*) is 
> 32-bits but...
> Patch to 3.7.37 is attached.

Most of xcircuit should be 64-bit clean, because I regularly compile
and run on my 64-bit systems (Intel Xeon and Core).  Only in occasional
spots may the casting be dependent on a value not being outside of the
32-bit range, as with the "clientdata" pointer in events.c that was at
the top of your patch (which should be okay;  it just casts the
32-bit integer "keywstate" into space occupied by a pointer, and then
casts it back again.  The only reason for it is to conform to the
clientdata record used by XtAppTimeOut in the Xt library, or
Tcl_CreateTimerHandler in Tcl/Tk.

I tested your patch and added a test for "unsigned long long" in
configure.in, or else your patch breaks the standard Linux "make"
process.  Otherwise, the patch looks okay, and I uploaded it to
the git repository on opencircuitdesign.


| Dr. R. Timothy Edwards (Tim)   | email: tim at opencircuitdesign.com    |
| Open Circuit Design, Inc.      | web:   http://opencircuitdesign.com |
| 22815 Timber Creek Lane        | phone: (301) 528-5030               |
| Clarksburg, MD 20871-4001      | cell:  (240) 401-0616               |

More information about the Xcircuit-dev mailing list