-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nim v1.2.0 with cygwin gcc: Compiling any code gives error: ‘_O_BINARY’ undeclared (first use in this function); did you mean ‘O_BINARY’? #13874
Comments
OK I tried using scoop to install nim and use the gcc installed by scoop instead. Compiling worked.
So I suspect this is due to gcc version. After downgrading to gcc 8.3.0 in cygwin, the compilation still does not work. So it seems cygwin's gcc just wouldn't work. |
This is pretty much expected. The code generated by the Nim compiler targets specifically Windows, not Cygwin. Cygwin is a POSIX-emulated environment to allow POSIX-compatible code to compile and run natively on Windows. Nim doesn't target this environment, it targets win32 directly, which is why you'll need the mingw compiler to compile the code. |
Cygwin is not supported. |
Versions:
Nim Compiler Version 1.2.0 [Windows: amd64]
Compiled at 2020-04-03
Copyright (c) 2006-2020 by Andreas Rumpf
git hash: 7e83adf
active boot switches: -d:release
Windows 10 64-bit.
Any code, even a simple helloworld.nim wouldn't compile, regardless how I installed Nim (either through choosenim or direct download). The message is:
I'm using gcc 9.3.0 from cygwin:
The text was updated successfully, but these errors were encountered: