I have downloaded from the ming64 download site the version for a Linux
host, set the PATH for critcl:
export PATH=/home/dia/mingw64/x86_64-w64-mingw32/bin/:$PATH
and started compiling:
$ tclkit critcl.kit -lib sha256c.tcl
Cross compiling for Windows using Xmingwin
Source: sha256c.tcl
Fri Jul 01 09:51:42 +0200 2011 - /home/dia/Projekte/gorilla/sha256c.tcl
gcc -r -nostdlib -DUSE_TCL_STUBS -I/home/dia/.critcl/Windows-x86
-DTCL_BYTE_ORDER=1234 -o
/home/dia/.critcl/Windows-x86/v035_7bf64913e94cd555e881b5a952aaab81_pic.o /home/dia/.critcl/Windows-x86/v035_7bf64913e94cd555e881b5a952aaab81.c
/home/dia/Projekte/gorilla/sha256.c
In file included from
/home/dia/.critcl/Windows-x86/v035_7bf64913e94cd555e881b5a952aaab81.c:5:0:
/home/dia/.critcl/Windows-x86/tcl.h:162:22: fatal error: stdio.h: Datei
oder Verzeichnis nicht gefunden
compilation terminated.
/home/dia/Projekte/gorilla/sha256.c:52:20: fatal error: string.h: Datei
oder Verzeichnis nicht gefunden
compilation terminated.
ERROR while compiling code in /home/dia/Projekte/gorilla/sha256c.tcl:
Error: Did not find: stdio.h and string.h
When doing the job for a 32bit Win library with the 32bit development
environment of xmingw there is no problem at all.
So I don't understand what causes the problems. My stdio.h and string.h
are in the default Linux path /usr/include ... A workaround would be to
create some symlinks but I would like to know why critcl doesn't find
the system libraries. Do I have to set some GCC environment variables or
TCL variables?
Has anyone tried to compile a 64bit library for Win64?
By the way:
As for Linux my application is downloaded 100 times for 64bit and for
32bit 114 times. I suppose for Windows it is the same meanwhile.
* Get the latest file from:
* Unpack it to <my-mingw64-path>
* remove machine and cpu description from the binaries' name:
cd <my-mingw64-path>/mingw/bin
for name in * ; do mv -v $name ${name:19} ; done
* Add to PATH: export PATH=<my-mingw64-path>/mingw/bin:$PATH
* Run: tclkit critcl.kit -pkg sha256c.tcl
Cross compiling for Windows using Xmingwin
Source: sha256c.tcl
Library: sha256c.dll
Package: /home/dia/Projekte/gorilla/lib/sha256c
As I have seen there is a version 2 for critcl.kit at http://www.digitalsmarties.com/pub/
dated 01-Apr-2010. It is offering a configuration file for comfortable setting of Cflags and Ldflags.
So the best will be to set there a working win64 configuration including the "-m64" option.