simavr + mingw/windows

280 views
Skip to first unread message

Thomas A

unread,
Jan 13, 2010, 7:14:00 PM1/13/10
to sim...@googlegroups.com
I wanted to show my snow_glow simulation to some friends and was too lazy to get my simulation to render to a video file.

So instead I cloned the repo and got simavr to compile with mingw. ( git://gitorious.org/~thomasa88/simavr/thomasa88s-simavr.git , mingw branch)

It is interesting to note that opengl in the simavr examples, and in my own project, runs faster with wine under linux than with native linux (at least on this old laptop).

Anyway, here's some windows binaries for windows users to look at. (tested on windows 7 by a friend)
The simduino example did not build as it does memory mapping, which need to be called differently in Windows.

I have managed to build simavr with the i686-w64-mingw32 toolchain and it will probably work with mingw32. I tried with x86_64-w64-mingw32 (64 bit target) but it failed when trying to link with the binary libs. I have tried building all libs with mingw but it's hard to get it right.

To build simavr with mingw32 a mingw32 tool chain is needed. Enter the name in Makefile.common inside the ifeq that tests if WIN=YES. By default it is set to i686-w64-mingw32. First run make ming-libs to fetch and install the libs (there's no check for if files are updated so it is separated from "all" because it won't need to be rebuilded when changing stuff in simavr). Then make all, everything should build except the simduino example. You need to symlink/copy freeglut.dll and pthreadGC2.dll, from ming-libs/lib/ to the examples' directories to make them work. Now the examples should be runnable using wine ./example_file.

I'll see if I can get to a windows computer and build simavr with mingw on it. It should be possible. It may even be simpler to use cygwin as I've read it has its own built-in pthread implementation.

//Thomas Axelsson - who doesn't even use Windows
Reply all
Reply to author
Forward
0 new messages