OK, so I had to get myself a cross toolkit to compile SMART for Windows x86 - I know others have done it and it's pretty simple on Debian/Ubuntu (You emerge some mingw package iirc, I did it on ubuntu before)
Anyway, I don't use Debian; I mainly use Gentoo, which has crossdev. And it's awesome.
Really, I never expected it to be that nice. I still haven't toyed around with it that much, but still. I just wanted to let some of you guys know.
Usage is simple; http://www.gentoo.org/proj/en/base/e...evelopment.xml
You install it; set up an overlay (basically just create a folder and set and env variably in /etc/make.conf) and run crossdev i686-mingw32 (we can also use other architectures - I am not 100% sure if they will all work, but I just want x86+windows now)
It will then just build the full tool chain - and it works too. Admittedly I haven't toyed around with it that much yet, but it seems to work fine...
I realise most of you won't care, but perhaps the ones who do actually have to do quite some cross compiling will care. (mopar, perhaps)
Code:
# crossdev i686-mingw32
--------------------------------------------------------------------------------
* crossdev version: 20100814
* Host Portage ARCH: amd64
* Target Portage ARCH: x86
* Target System: i686-mingw32
* Stage: 4 (C/C++ compiler)
* binutils: binutils-[latest]
* gcc: gcc-[latest]
* headers: w32api-[latest]
* libc: mingw-runtime-[latest]
* PORTDIR_OVERLAY: /usr/local/overlays/crossdev
* PORT_LOGDIR: /var/log/portage
* PKGDIR: /usr/portage/packages/cross/i686-mingw32
* PORTAGE_TMPDIR: /var/tmp/cross/i686-mingw32
_ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ -
* Forcing the latest versions of {binutils,gcc}-config/gnuconfig ... [ ok ]
* Log: /var/log/portage/cross-i686-mingw32-binutils.log
* Emerging cross-binutils ... [ ok ]
* Log: /var/log/portage/cross-i686-mingw32-w32api-quick.log
* Emerging cross-w32api-quick ... [ ok ]
* Log: /var/log/portage/cross-i686-mingw32-mingw-runtime-headers.log
* Emerging cross-mingw-runtime-headers ... [ ok ]
* Log: /var/log/portage/cross-i686-mingw32-gcc-stage1.log
* Emerging cross-gcc-stage1 ... [ ok ]
* Log: /var/log/portage/cross-i686-mingw32-w32api.log
* Emerging cross-w32api ... [ ok ]
* Log: /var/log/portage/cross-i686-mingw32-mingw-runtime.log
* Emerging cross-mingw-runtime ... [ ok ]
* Log: /var/log/portage/cross-i686-mingw32-gcc-stage2.log
* Emerging cross-gcc-stage2 ... [ ok ]
Code:
$ vim Makefile # Had to change the cross compiler name.
$ make windows
Compiling Main.cpp
Compiling Color.cpp
Compiling Java Classes...
src/smart/Client.java:66: warning: sun.applet.AppletClassLoader is internal proprietary API and may be removed in a future release
import sun.applet.AppletClassLoader;
^
src/smart/Client.java:531: warning: sun.applet.AppletClassLoader is internal proprietary API and may be removed in a future release
thisLoader = AppletClassLoader.newInstance(new URL[] { clientConnection.getJarFileURL() });
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 warnings
Encoding Java classes...
+build/java/java/awt/Canvas$AccessibleAWTCanvas.class
+build/java/java/awt/Canvas.class
+build/java/smart/EventRedirect.class
+build/java/smart/Client.class
+build/java/smart/Client$3.class
+build/java/smart/ClientStub.class
+build/java/smart/EventNazi.class
+build/java/smart/EventNazi$KeySender.class
+build/java/smart/Client$2.class
+build/java/smart/UnblockedEvent.class
+build/java/smart/BlockingEventQueue.class
+build/java/smart/Client$1.class
+build/java/smart/Client$4.class
Compiling Classloader.cpp
Compiling Input.cpp
Compiling Reflection.cpp
Compiling JVM.cpp
Compiling Smart.cpp
Linking object files...
Finished Building the Windows SMART distribution
I'm going to try it on my ARM sheevaplug soon, I think.
E: It did pick GCC 4.5 though, which is as far as I know not extremely well tested.