User forums > Using Code::Blocks

Linking the pthread library

<< < (3/3)

oBFusCATed:
mloutris: This solution is wrong on many levels.

1. You need to pass -pthread not -lpthread.
2. You need to pass it both to the compiler and linker.
3. Putting such options in the global settings is wrong, you need to put these in the project, so the code could be moved from one machine to the next...

The original problem in the topic is related to the use of rpath=@ORIGIN by the looks of it...

Navigation

[0] Message Index

[*] Previous page

Go to full version