[Haskell-beginners] Haskell ghc, linking error when trying to compile a program using ghc and Euterpea
Florian Gillard
florian.gillard at gmail.com
Sat May 2 13:19:48 UTC 2015
I am checking out the computing music development library Euterpea, and I
am trying to compile the following basic program:
import Euterpea
t251 :: Music Pitch
t251 = let dMinor = d 4 wn :=: f 4 wn :=: a 4 wn
gMajor = g 4 wn :=: b 4 wn :=: d 5 wn
cMajor = c 4 bn :=: e 4 bn :=: g 4 bn
in dMinor :+: gMajor :+: cMajor
main = play t251
the program works fine inside ghci, but when I try to compile it using ghc
test.hs I get the following error message:
Linking test ... /usr/bin/ld:
/home/fayong/.cabal/lib/PortMidi-0.1.3/ghc-7.6.3/libHSPortMidi-0.1.3.a(ptlinux.o):
undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing
from command line collect2: error: ld returned 1 exit status
It seems to be a linking error but I don't know how to fix it. (I tried to
pass -lpthread as an option but it didn't work)
I installed Euterpea via cabal, on linux mint 17
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20150502/846ca0b5/attachment.html>
More information about the Beginners
mailing list