Yes the .exe and .dll's should work just fine on any platform, including Windows, and regardless of which platform they were created on. Years ago I created, on Mac, an OpenTK program that rotated a cube on screen with 3D acceleration. I then took it over to Windows and it ran there without recompiling.
There are exceptions to this however mostly having to do with libraries that may not be available on one platform, or needing to rebuild simply to point to the correct libraries.
On Windows, I recommend .NET because it runs substantially faster than Mono, but it's not a requirement. Also there is a GTK# installer for Windows. I have a GTK# app that runs on both Mac and Windows. I do build it separately. Here are the build scripts:
- Code: Select all
$ cat bin/_common
cd ..
$ cat bin/build
#!/bin/bash
# change to the directory of the script
cd "`dirname "$0"`"
source _common
mkdir -p build
cd source
cobra -c -d -color -timeit \
-copy-core \
-out:../build/TimeTracker.exe \
-pkg:gtk-sharp-2.0 \
"$@" \
lib/ObjectLister.cobra \
models/Project.cobra \
models/FileModel.cobra \
models/Invoice.cobra \
models/Time.cobra \
models/Total.cobra \
gtk/TimeTracker.cobra \
gtk/Extensions.cobra \
gtk/TextEditor.cobra \
gtk/AppWide.cobra
$ cat bin/build.cmd
@rem build on Windows
@rem must install gtk-sharp-2.12.42.msi or similar
@rem found in my Dropbox\Windows\Packages
@rem also found at http://www.mono-project.com/download/ in "GTK# for Windows" section
if not exist "build-win\" mkdir build-win
cd source
call cobra -c -d -color -timeit ^
-copy-core ^
-out:../build-win/TimeTracker.exe ^
-native-compiler-arg:"/platform:x86" ^
-target:winexe ^
-lib:"C:\Program Files (x86)\GtkSharp\2.12\lib\gtk-sharp-2.0" ^
-ref:glib-sharp.dll ^
-ref:gdk-sharp.dll ^
-ref:gtk-sharp.dll ^
-ref:atk-sharp.dll ^
-ref:pango-sharp.dll ^
%* ^
lib/ObjectLister.cobra ^
models/Project.cobra ^
models/FileModel.cobra ^
models/Invoice.cobra ^
models/Time.cobra ^
models/Total.cobra ^
gtk/TimeTracker.cobra ^
gtk/Extensions.cobra ^
gtk/TextEditor.cobra ^
gtk/AppWide.cobra
cd ..
HTH!