jmeubank / tdm-gcc

TDM-GCC is a cleverly disguised GCC compiler for Windows!
https://jmeubank.github.io/tdm-gcc/
572 stars 49 forks source link

Including Iostream causes issues #30

Closed humble-barnacle001 closed 3 years ago

humble-barnacle001 commented 3 years ago

Issue: Does not compile when #include <iostream> is present Screenshot: image

Platform: Windows 10 20H2 Release: 9.2.0

jmeubank commented 3 years ago

Works fine here. Can you check if the errno.h file is up-to-date? It should include definitions for those constants. You may need to wipe out your install and reinstall.

joeub@DESKTOP-1LUONFR MINGW64 /crossdev/gccmaster
$ grep -R EBADMSG /c/TDM-GCC-64-9.2.0/x86_64-w64-mingw32/include
/c/TDM-GCC-64-9.2.0/x86_64-w64-mingw32/include/errno.h:#ifndef EBADMSG
/c/TDM-GCC-64-9.2.0/x86_64-w64-mingw32/include/errno.h:#define EBADMSG 104

joeub@DESKTOP-1LUONFR MINGW64 /crossdev/tests
$ cat >iostream-test.cc <<EOF
> #include <iostream>
>
> int main() {
>   return 0;
> }
> EOF

joeub@DESKTOP-1LUONFR MINGW64 /crossdev/tests
$ /c/TDM-GCC-64-9.2.0/bin/g++ -o iostream-test.exe iostream-test.cc

joeub@DESKTOP-1LUONFR MINGW64 /crossdev/tests
$ ./iostream-test.exe

joeub@DESKTOP-1LUONFR MINGW64 /crossdev/tests
$