Skip to content
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

Compiling calculator example fails on windows 11 using GCC #5

Closed
ghost opened this issue Jul 14, 2023 · 2 comments
Closed

Compiling calculator example fails on windows 11 using GCC #5

ghost opened this issue Jul 14, 2023 · 2 comments

Comments

@ghost
Copy link

ghost commented Jul 14, 2023

logs:


C:\Users\faisal\Desktop\uing-main\examples\calculator>nimble install
  Verifying dependencies for calculator@0.1.0
      Info: Dependency on uing@>= 0.2.0 already satisfied
  Verifying dependencies for uing@0.8.0
 Installing nimkalc@any version
Downloading https://github.com/nocturn9x/nimkalc using git
  Verifying dependencies for nimkalc@0.2.8
 Installing nimkalc@0.2.8
   Success: nimkalc installed successfully.
 Installing calculator@0.1.0
   Building calculator/calculator.exe using c backend
C:\Users\faisal\nimcache\calculator_r\@m..@s..@s..@s..@s..@s..@s..@snim-1.6.14@slib@ssystem@sio.nim.c: In function ‘atmdotdotatsdotdotatsdotdotatsdotdotatsdotdotatsdotdotatsdotdotatsnimminus1dot6dot14atslibatssystematsiodotnim_Init000’:
C:\Users\faisal\nimcache\calculator_r\@m..@s..@s..@s..@s..@s..@s..@snim-1.6.14@slib@ssystem@sio.nim.c:60:23: error: ‘_O_BINARY’ undeclared (first use in this function); did you mean ‘O_BINARY’?
   60 |         _setmode(T1_, _O_BINARY);
      |                       ^~~~~~~~~
      |                       O_BINARY
C:\Users\faisal\nimcache\calculator_r\@m..@s..@s..@s..@s..@s..@s..@snim-1.6.14@slib@ssystem@sio.nim.c:60:23: note: each undeclared identifier is reported only once for each function it appears in
Error: execution of an external compiler program 'gcc.exe -c  -w -fmax-errors=3 -mno-ms-bitfields -DWIN32_LEAN_AND_MEAN -O3 -fno-strict-aliasing -fno-ident   -IC:\nim-1.6.14\lib -IC:\Users\faisal\Desktop\uing-main\examples\calculator\src -o C:\Users\faisal\nimcache\calculator_r\@m..@s..@s..@s..@s..@s..@s..@snim-1.6.14@slib@ssystem@sio.nim.c.o C:\Users\faisal\nimcache\calculator_r\@m..@s..@s..@s..@s..@s..@s..@snim-1.6.14@slib@ssystem@sio.nim.c' failed with exit code: 1


       Tip: 16 messages have been suppressed, use --verbose to show them.
     Error: Build failed for package: calculator
        ... Execution failed with exit code 1
        ... Command: C:\nim-1.6.14\bin\nim.exe c --colors:on --noNimblePath -d:release -d:NimblePkgVersion=0.1.0 --path:C:\Users\faisal\.nimble\pkgs\uing-0.8.0 --path:C:\Users\faisal\.nimble\pkgs\nimkalc-0.2.8 --hints:off -o:C:\Users\faisal\Desktop\uing-main\examples\calculator\calculator.exe C:\Users\faisal\Desktop\uing-main\examples\calculator\src\calculator.nim
@neroist
Copy link
Owner

neroist commented Jul 14, 2023

Is this issue present in the other examples for you? Is gcc the only c compiler that results in this issue? This seems like an issue with Nim's code generation.

@ghost
Copy link
Author

ghost commented Jul 16, 2023

nvm i ended up figuring out that i borked my msys2 installation :)

@ghost ghost closed this as completed Jul 16, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant