|
From: Prapan C. <nqu...@ho...> - 2016-09-06 02:21:16
|
Base on answer of Keith yesterday I can solve my problem On 04/09/16 11:17, ent...@gm... wrote: > ... when I run "gcc test.c" it doesn't compile and I get the > following error: > > .../ld.exe: cannot find -lpthread collect2.exe: error: ld returned > 1 exit status So, a missing libpthread.a or libpthread.dll.a dependency; thanks for bringing this to our attention. You should install the libpthreadgc-dev package; (from the CLI): mingw-get install libpthreadgc-dev (or, if you are a GUI junkie, run mingw-get in GUI mode -- DO NOT run mingw-get-setup.exe again -- scroll down until you find it, and install it from there). Of course, mingw-get should have known about this dependency, when you installed GCC; I need to fix that, but a manual installation is still going to be the quickest and easiest way to get you up and running. Here is what i do: I delete MinGW folder. Then setup again from new. Then when I mark for installation for mingw-developer-toolkit, mingw32-base, mingw32-gcc-ada, mingw32-gcc-fortran, mingw32-gcc-g++, mingw32-gcc-objc, msys-base. Then apply. It turn out that some packages can't download in 1st try. Still there is mark for installation for those package that not yet downloaded. All I need to do is apply changes again until they all downloaded and installed. Noted when I mark for installation of mingw32-base, it also mark for install libpthreadgc-dev and libpthreadgc-dll. Which is the answered by Keith. That is solved linking problem. Thankyou Sent from Samsung tablet. |