0

Hi I am having some issues with my c++ program. I am using g++ gnu and it is on windows 10. here is the error that is showing up:

ld.exe: cannot find -lpthread collect2.exe: error: ld returned 1 exit status

please help because i can not work out what is going on.

Thanks, Asher

Asher
  • 1
  • 4

1 Answers1

0

That is a linker error. Not a compiler error. It is complaining that it cannot find the pthread library in the library search path. Either it simply isn't there or you need to indicate where it is with the -L option. Or, in case pthread is not needed, remove the -lpthread option so you don't attempt to link to it.

Jesper Juhl
  • 30,449
  • 3
  • 47
  • 70