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 find input file -c.d #269

Closed
JudgeFish opened this issue Feb 25, 2024 · 1 comment
Closed

Cannot find input file -c.d #269

JudgeFish opened this issue Feb 25, 2024 · 1 comment

Comments

@JudgeFish
Copy link

When building the default "D/VC++ based Windows Application" template in VS2022 I get the following error:
COMPILED : error : cannot find input file -c.d

After investigating what dmd actually got it looks like the first argument argv[1] begins with a BOM.
So the first argument "-c" becomes 239, 187, 191, 45, 99, 0 (0xEFBBBF is the UTF-8 byte order mark)

The compilation error only occurs for dmd builds, not for ldc and only when having the experimental UTF-8 support in Windows 11 enabled: Region Settings - "Beta: Use Unicode UTF-8 for worldwide language support"
It does not happen in "visuald" projects either.

I have not debugged ldc to see if same thing happens there but I suspect it might ignore the BOM.

@rainers
Copy link
Member

rainers commented Feb 26, 2024

I can reproduce this: with UTF-8 as the system encoding the response file is now created with UTF-8 encoding as well. The C# StreamWriter defaults to adding a BOM in this case (which has been disabled for LDC). Should be fixed in https://github.com/dlang/visuald/releases/tag/v1.4.0-rc1

@rainers rainers closed this as completed Feb 26, 2024
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

2 participants