News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Help!

Started by ming, September 04, 2016, 07:51:14 PM

Previous topic - Next topic

ming

So I just started programming with C, but I received this error message, and I'm not sure how to fix it? Thanks for helping out!

"-------------- Build: Debug in HelloWorld (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe  -o bin\Debug\HelloWorld.exe obj\Debug\main.o   
c:/mingw/bin/../lib/gcc/mingw32/5.3.0/../../../../mingw32/bin/ld.exe: cannot find -lpthread
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
2 error(s), 0 warning(s) (0 minute(s), 0 second(s)) "

The code is just the basic Hello World,
"#include <stdio.h>
#include <stdlib.h>

int main()
{
    printf("Hello world!\n");
    return 0;
}
"

stahta01

#1
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]