OpenVG: Linker errors with ghc --make, but not with ghci?

I followed the instructions on how to build OpenVG on Windows. It works fine when I run the examples using "GHCi -lopenvg32", but when compiling it with "GHC --make -lopenvg32" I get a bunch of linker errors, like C:\Program Files\Haskell\OpenVG-0.1\ghc-6.10.1/libHSOpenVG-0.1.a(Paths.o):fake:(.text+0x82): undefined reference to `vgInterpolatePath' C:\Program Files\Haskell\OpenVG-0.1\ghc-6.10.1/libHSOpenVG-0.1.a(Paths.o):fake:(.text+0x40d): undefined reference to `vgModifyPathCoords' etc However it does seem that the libopenvg32.a file contains all these undefined references, and it is in the gcc-lib directory of GHC. I'm a stuck. Any hints? Thanks, Peter

Hi Peter
Yes this is definitely a problem with the OpenVG package.
Although I wrote the package I don't know enough about the minutiae of
Windows .dlls to sort this out directly (even though I did write most
of the library on a Windows machine). I could try to and write a
cabal+makefile build rather than a pure cabal one to follow the
example of the OpenGL and GLUT libraries, though I don't know if that
would work. With my current OpenGL and GLUT installation[1] on Windows
I can only run GL programs from GHCi rather than compile them.
Please let me know if you want me to try a cabal+makefile package,
though the turnaround might not be quick.
Best wishes
Stephen
[1] installed by following these instructions
http://netsuperbrain.com/blog/posts/freeglut-windows-hopengl-hglut/
2009/3/4 Peter Verswyvelen
I followed the instructions on how to build OpenVG on Windows. It works fine when I run the examples using "GHCi -lopenvg32", but when compiling it with "GHC --make -lopenvg32" I get a bunch of linker errors, like C:\Program Files\Haskell\OpenVG-0.1\ghc-6.10.1/libHSOpenVG-0.1.a(Paths.o):fake:(.text+0x82): undefined reference to `vgInterpolatePath' C:\Program Files\Haskell\OpenVG-0.1\ghc-6.10.1/libHSOpenVG-0.1.a(Paths.o):fake:(.text+0x40d): undefined reference to `vgModifyPathCoords' etc However it does seem that the libopenvg32.a file contains all these undefined references, and it is in the gcc-lib directory of GHC. I'm a stuck. Any hints? Thanks, Peter
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Thanks for the feedback.
Yes this is definitely a complex thing.
I succeeded in just the opposite: with a lot of hackery I got the FTGL
binding on Hackage to compile and correctly run. However, when using
it from GHCi it "compiles" correctly but fails to load the font and
hence crashes.
I'll try to look into the problem too, since I want to learn the FFI stuff.
I'm also thinking to wrap QuesoGLC since it seems to have a nicer API
then FTGL although I'm not sure it's worth the trouble
On Wed, Mar 4, 2009 at 12:25 PM, Stephen Tetley
Hi Peter
Yes this is definitely a problem with the OpenVG package.
Although I wrote the package I don't know enough about the minutiae of Windows .dlls to sort this out directly (even though I did write most of the library on a Windows machine). I could try to and write a cabal+makefile build rather than a pure cabal one to follow the example of the OpenGL and GLUT libraries, though I don't know if that would work. With my current OpenGL and GLUT installation[1] on Windows I can only run GL programs from GHCi rather than compile them.
Please let me know if you want me to try a cabal+makefile package, though the turnaround might not be quick.
Best wishes
Stephen
[1] installed by following these instructions http://netsuperbrain.com/blog/posts/freeglut-windows-hopengl-hglut/
2009/3/4 Peter Verswyvelen
: I followed the instructions on how to build OpenVG on Windows. It works fine when I run the examples using "GHCi -lopenvg32", but when compiling it with "GHC --make -lopenvg32" I get a bunch of linker errors, like C:\Program Files\Haskell\OpenVG-0.1\ghc-6.10.1/libHSOpenVG-0.1.a(Paths.o):fake:(.text+0x82): undefined reference to `vgInterpolatePath' C:\Program Files\Haskell\OpenVG-0.1\ghc-6.10.1/libHSOpenVG-0.1.a(Paths.o):fake:(.text+0x40d): undefined reference to `vgModifyPathCoords' etc However it does seem that the libopenvg32.a file contains all these undefined references, and it is in the gcc-lib directory of GHC. I'm a stuck. Any hints? Thanks, Peter
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (2)
-
Peter Verswyvelen
-
Stephen Tetley