x42 / xjadeo

X JAck viDEo mOnitor: a tool that displays a video clip in sync with an external time source (jack-transport, LTC and MTC). Applications include: soundtrack composition/editing, video monitoring and -installations.
http://xjadeo.sf.net/
GNU General Public License v2.0
43 stars 7 forks source link

Linking with pthreads #18

Closed nick87720z closed 5 years ago

nick87720z commented 7 years ago

When building with Posix QM disabled, it tries to use pthread, and i get several errors about undefined references:

$ ./configure --disable-portmidi --disable-mq
.....leads to.....
gcc "-DSUBVERSION=\"v0.8.7-5-g8fa8b57\"" -g -O2   -o xjremote xjremote-xjremote.o  -L/usr/X11R6/lib
xjremote-xjremote.o: In function `main':
/home/nick87720z/dist/xjadeo/src/xjadeo/xjremote.c:715: warning: the use of `tempnam' is dangerous, better use `mkstemp'
/home/nick87720z/dist/xjadeo/src/xjadeo/xjremote.c:752: undefined reference to `pthread_create'
/home/nick87720z/dist/xjadeo/src/xjadeo/xjremote.c:764: undefined reference to `pthread_cancel'
/home/nick87720z/dist/xjadeo/src/xjadeo/xjremote.c:765: undefined reference to `pthread_join'

Configuring with LDFLAGS=-lpthreads solves issue.

Don't know, is --disable-mq only issue trigger. Grepping for gives this list: ./src/xjadeo/xjadeo.c:25:#include ./src/xjadeo/xjremote.c:314:#include ./src/xjadeo/xjremote.c:610:#include ./src/xjadeo/display_gl_win.c:23:#include ./src/xjadeo/display_gl_osx.m:29:#include ./src/xjadeo/remote.c:1223:#include ./src/xjadeo/main.c:37:#include ./src/xjadeo/midi.c:727:#include