Hi there,
In the latest SVN source, I need to explicitely link with -pthread on a Debian Wheezy (testing) system in order to build g2ghpro.
make[2]: Entering directory `/home/dgruber/game2midi/src'
g++ -DHAVE_CONFIG_H -I. -I.. -g -O2 -D__LINUX_ALSASEQ__ -g -O2 -MT game2midi.o -MD -MP -MF .deps/game2midi.Tpo -c -o game2midi.o game2midi.cpp
mv -f .deps/game2midi.Tpo .deps/game2midi.Po
g++ -DHAVE_CONFIG_H -I. -I.. -g -O2 -D__LINUX_ALSASEQ__ -g -O2 -MT ConfigFile.o -MD -MP -MF .deps/ConfigFile.Tpo -c -o ConfigFile.o ConfigFile.cpp
mv -f .deps/ConfigFile.Tpo .deps/ConfigFile.Po
g++ -g -O2 -o game2midi game2midi.o ConfigFile.o -lasound
g++ -DHAVE_CONFIG_H -I. -I.. -g -O2 -D__LINUX_ALSASEQ__ -g -O2 -MT RtMidi.o -MD -MP -MF .deps/RtMidi.Tpo -c -o RtMidi.o RtMidi.cpp
mv -f .deps/RtMidi.Tpo .deps/RtMidi.Po
g++ -DHAVE_CONFIG_H -I. -I.. -g -O2 -D__LINUX_ALSASEQ__ -g -O2 -MT g2ghpro.o -MD -MP -MF .deps/g2ghpro.Tpo -c -o g2ghpro.o g2ghpro.cpp
mv -f .deps/g2ghpro.Tpo .deps/g2ghpro.Po
g++ -g -O2 -o g2ghpro RtMidi.o g2ghpro.o -lasound
/usr/bin/ld: RtMidi.o: undefined reference to symbol 'pthread_join@@GLIBC_2.0'
/usr/bin/ld: note: 'pthread_join@@GLIBC_2.0' is defined in DSO /lib/libpthread.so.0 so try adding it to the linker command line
/lib/libpthread.so.0: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[2]: *** [g2ghpro] Error 1
make[2]: Leaving directory `/home/dgruber/game2midi/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/dgruber/game2midi'
make: *** [all] Error 2
The attached patch fixes this (although you alsow might want to test for existence of libpthread).
Cheers,
Daniel
dgruber@sircams:~/game2midi$ uname -a
Linux sircams 2.6.38-2-686 #1 SMP Sun May 8 14:49:45 UTC 2011 i686 GNU/Linux
patch for configure.in