Stucking with pthreads
Posted: Sun Jul 13, 2014 11:11 am
Hello! I have in my workspace 3 projects, two - console applications (Ubuntu14.04. GCC), and common library - static now.
The library uses pthreads, implementing wrappers for multitasking... when i make library - all is ok... but when i make any of my console apps - it finishes with error - "undefined reference to `pthread_create'"...which hints that pthread code is not linked into my library.
internet speaks a lot about this issue, and recommends to add -lpthread option to gcc options... but add it after a list of object files... but "compiler additional options" adds new options before object files list... (it i added -lpthread there, problem is not solved)...
So i m searching a way to easy add compiler options after object files list.
Regards, Alex
The library uses pthreads, implementing wrappers for multitasking... when i make library - all is ok... but when i make any of my console apps - it finishes with error - "undefined reference to `pthread_create'"...which hints that pthread code is not linked into my library.
internet speaks a lot about this issue, and recommends to add -lpthread option to gcc options... but add it after a list of object files... but "compiler additional options" adds new options before object files list... (it i added -lpthread there, problem is not solved)...
So i m searching a way to easy add compiler options after object files list.
Regards, Alex