I have been struggling to get simple code to compile on Win7 or Win10. I installed MinGW graphical install for 'mingw32-base', 'mingw32-gcc-g++', 'mingw32-gcc-obj', and 'msys-base'. I am just needing a c compiler for now, so I'm assuming that just installing 'mingw32-gcc-g++' should be all I need. After installing I added C:\MinGW\bin to my path in windows. Not sure what else I'm missing here.
My code:
Code:
#include<stdio.h>
int main(){char *c="int main(){char *c=%c%s%c;printf(c,34,c,34);}";printf(c,34,c,34);}
My Error:
Code:
c:/mingw/bin/../lib/gcc/mingw32/5.3.0/../../../../mingw32/bin/ld.exe: cannot find -lpthread
collect2.exe: error: ld returned 1 exit status
From what I have read, this error is happening because its not finding the libraries?