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

cl preferring WindowsSDK Headers over custom headers. #100

Open
KungFuDonkey opened this issue Dec 24, 2023 · 1 comment
Open

cl preferring WindowsSDK Headers over custom headers. #100

KungFuDonkey opened this issue Dec 24, 2023 · 1 comment

Comments

@KungFuDonkey
Copy link

In a project that I am doing I have a custom installation of DirectX and a custom build system. On Windows I ensure that the include folder of this custom DirectX folder is the first in the build command:

cl.exe .... -/external:I "Custom/directx/include" ... -/external:I "path/to/windowsSDK/includes/"

On Windows this allows me to overwrite the DirectX header files, such as d3dcommon.h and d3d12.h, with a custom version from a DirectX branch.

On Linux with msvc-wine I ensured that the same order of cli arguments are given to the cl compiler, however, it prefers the d3dcommon.h and d3d12.h in the WindowsSDK and does not consider my custom header files. I tried to see if the include paths are somehow prepended to my cli arguments, but I was unable to find them.

For now a solution that I have found that works for me is to completely remove the header files from the WindowsSDK, however, this is only a temporary solution as we might need to use the header files of the WindowsSDK in the future.

Is there a way to tell the cl compiler which include path I prefer? Thanks in advance!

PS. AMAZING project man ty very much :)

@mstorsjo
Copy link
Owner

My main guess here, is that the paths that you pass are in a unix-y form where cl.exe in wine won't resolve it correctly. We do rewrite some paths in some arguments to fix such issues, have a look in wine-msvc.sh - not sure if that's happening here or not.

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