OpenVG-0.4.0: InstallWindows.txt
These instructions assume you have Haskell and OpenGL with the
split packages working and have MinGW/msys installed and are
comfortable with them.
------------------------------------------------------------------
Part 1. The C library.
Download the ShivaVG C library from Sourceforge (version 0.2.1):
http://sourceforge.net/projects/shivavg/
Unzip ShivaVG-0.2.1.zip somewhere below msys/1.0, I use my home
directory:
C:/msys/1.0/home/stephen
Run msys and go to ShivaVG's src directory:
> cd ShivaVG-0.2.1/src
Compile with gcc directly - this is a hack but the makefile has
problems with MinGW/msys:
> gcc -O2 -c *.c -I../include/VG
That should build the *.o files.
> gcc -shared -o openvg32.dll *.o -Wl,--enable-stdcall-fixup,--out-implib,libopenvg32.a -lopengl32 -lglu32 -lgdi32 -lwinmm
That should create `openvg32.dll` and `libopenvg32.a`.
Put `libopenvg32.a` into your MinGW lib directory, on my system
it is here:
C:\MinGW\lib
Also copy the `vg` folder that contains the header files from
`shivavg-0.2.0\include` to the MinGW include directory, on my
system it is here:
C:\MinGW\include
You should have folders for both the GL and OpenVG headers:
C:\MinGW\include\GL
C:\MinGW\include\vg
You should now be able to build the Haskell binding to Shiva.
------------------------------------------------------------------
Part 2. The bindings.
I dropped the archive into my home directory
C:\msys\1.0\home\stephen
> tar xvfz OpenVG-0.3.X.tar.gz
> cd OpenVG-0.3.X
> runhaskell Setup.lhs configure
> runhaskell Setup.lhs build
> runhaskell Setup.lhs install
> runhaskell Setup.lhs haddock
Finally try the example:
Copy `openvg32.dll` into the examples directory.
> cd examples
> runhaskell -lopenvg32 TestVgu.hs