Skip to content

Running Visual Studio's Native Tools script #709

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

Open
DelofJ opened this issue Mar 19, 2025 · 0 comments
Open

Running Visual Studio's Native Tools script #709

DelofJ opened this issue Mar 19, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@DelofJ
Copy link

DelofJ commented Mar 19, 2025

So, the native-image uses the Visual Studio compiler
To use this compiler, we can launch a new terminal with
Or we can use an existing terminal by running C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat (or a similar path to this)
However, when using Intellij IDEA with this plugin, the environment is not set by default, making the compilation not usable as is

My solution would be to add an option inside the graalvmNative of build.gradle that would look something like

graalvmNative {
    vsToolsPath = "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
}

And that runs the corresponding script to enable the environment before building
(sorry if there's already an alternative, I did not manage to find an easy one)

@DelofJ DelofJ added the enhancement New feature or request label Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant