This command line works beautifully on ubuntu (using C++ and threading):
g++ -std=c++11 prog.cpp -o prog.out -lpthread
my makefile just blows up:
all: main
main: prog.o
g++ -o prog prog.o
prog.o: prog.cpp
g++ -std=c++11 -c prog.cpp -lpthread
I'm not sure but it appears the -lpthread flag isn't being picked up. It's late and I've been working on the makefile for two hours, and any help would be appreciated.
make returns an error:undefined reference to 'pthread_create'
-lpthreadinto the recipe formain.