skydevgit / crisscross

Automatically exported from code.google.com/p/crisscross
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Undefined reference to 'pthread_join' #32

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Wanted to make use of CC's ThreadSleep function for Inceku
(ThreadSleep(500) is what I used), and the compiler returned this:
/home/eddie/Desktop/crisscross/source/system.cpp:135: undefined reference
to `pthread_join'

Might just be user error, but I'm submitting this just to be sure.

Original issue reported on code.google.com by eddie.ri...@gmail.com on 4 Nov 2008 at 2:11

GoogleCodeExporter commented 9 years ago
Why is WaitForThread called anyway? I can't find any code in ThreadSleep that 
calls it.

Original comment by eddie.ri...@gmail.com on 4 Nov 2008 at 2:14

GoogleCodeExporter commented 9 years ago
You need to add -lpthread to your link options to fix the linker error.

WaitForThread will pause execution of the main thread until an external thread
finishes execution.

Original comment by steven.n...@gmail.com on 4 Nov 2008 at 3:58