
Hello, I have installed the Hipmunk physics library (5.2.0.1) using cabal-install, but whenever I try to compile a program that uses it (e.g. the HipmunkPlayground package), I get the following linker error:
$ cabal install hipmunkplayground Resolving dependencies... Configuring HipmunkPlayground-5.2.0... Preprocessing executables for HipmunkPlayground-5.2.0... Building HipmunkPlayground-5.2.0... [1 of 1] Compiling Main ( Playground.hs, dist/build/HipmunkPlayground/HipmunkPlayground-tmp/Main.o ) Linking dist/build/HipmunkPlayground/HipmunkPlayground ... /home/ulrik/.cabal/lib/Hipmunk-5.2.0.1/ghc-6.12.3/libHSHipmunk-5.2.0.1.a(Callbacks.o): In function `sr0l_info': (.text+0x1062): undefined reference to `cpArbiterIsFirstContact' /home/ulrik/.cabal/lib/Hipmunk-5.2.0.1/ghc-6.12.3/libHSHipmunk-5.2.0.1.a(Callbacks.o): In function `srBn_info': (.text+0x37f8): undefined reference to `cpArbiterGetShapes' collect2: ld returned 1 exit status cabal: Error: some packages failed to install: HipmunkPlayground-5.2.0 failed during the building phase. The exception was: ExitFailure 1
The problem does not seem to be with HipmunkPlayground, since loading Hipmunk in ghci and evaluating `initChipmunk' also generates an error:
Prelude> import Physics.Hipmunk Prelude Physics.Hipmunk> initChipmunk Loading package StateVar-1.0.0.0 ... linking ... done. Loading package array-0.3.0.1 ... linking ... done. Loading package containers-0.3.0.0 ... linking ... done. Loading package transformers-0.2.2.0 ... linking ... done. Loading package Hipmunk-5.2.0.1 ... linking ... <interactive>: /home/ulrik/.cabal/lib/Hipmunk-5.2.0.1/ghc-6.12.3/HSHipmunk-5.2.0.1.o: unknown symbol `cpArbiterIsFirstContact' ghc: unable to load package `Hipmunk-5.2.0.1'
Does anyone have a clue as to what might be wrong? I am using Ubuntu 10.10, gcc 4.4.5 and ghc 6.12.3. Thanks :) /Ulrik Rasmussen