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

Cannot compile anything on Windows #13528

Closed
devnote-dev opened this issue May 30, 2023 · 2 comments · Fixed by #13530
Closed

Cannot compile anything on Windows #13528

devnote-dev opened this issue May 30, 2023 · 2 comments · Fixed by #13530
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. platform:windows Windows support based on the MSVC toolchain / Win32 API

Comments

@devnote-dev
Copy link
Contributor

A simple puts "Hello world" script fails on Windows using the master branch:

C:\...\> crystal run hello.cr
LINK : fatal error LNK1104: cannot open file 'OLDNAMES.lib'
Error: execution of command failed with exit status 2: ...

I've also tried passing specific linker flags (mentioned in the Discord server) which causes a different error message:

C:\...\> crystal run hello.cr --link-flags=/NODEFAULTLIB:OLDNAMES.lib
LINK : fatal error LNK1104: cannot open file 'uuid.lib'
Error: execution of command failed with exit status 2: ...

Crystal version:

Crystal 1.9.0-dev [df19a1d] (2023-05-27)

The compiler was not built in release mode.

LLVM: 16.0.3
Default target: x86_64-pc-windows-msvc
@devnote-dev devnote-dev added the kind:bug A bug in the code. Does not apply to documentation, specs, etc. label May 30, 2023
@Blacksmoke16 Blacksmoke16 added the platform:windows Windows support based on the MSVC toolchain / Win32 API label May 30, 2023
@HertzDevil
Copy link
Contributor

Does uuid.lib actually exist on your system? Does build --verbose show any /LIBPATHs?

@devnote-dev
Copy link
Contributor Author

devnote-dev commented May 30, 2023

It should as Crystal was able to compile before I updated to master, and I haven't touched any of the lib files. It seems that uuid.lib was removed when updating to master, but in previous versions it's always been there 🤔

There are no /LIBPATHs in the verbose output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. platform:windows Windows support based on the MSVC toolchain / Win32 API
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants