Skip to content

[Native Image] Got 2 unresolved external symbol while building Native Image #10426

Closed
@MoritzArena

Description

@MoritzArena

Describe the Issue

I am adapting GraalVM for Nacos. In the past, I was able to successfully package the Native Image binary program through GraalVM on the Windows 11 platform. However, after I upgraded Visual Studio, a build error occurred. Specifically, it was missing two link symbols:

  1. __imp_SHGetFolderPathW referenced in function getHomeFromShell32
  2. SHGetKnownFolderPath referenced in function getHomeFromShell32

These problems only occur on the Windows 11 platform. The binary file can be packaged normally on Linux. My environment information is as follows:

Name Value
Java version 17.0.13+10-LTS
Vendor version Oracle GraalVM 17.0.13+10.1
Runtime version 17.0.13+10-LTS-jvmci-23.0-b49
C compiler cl.exe (microsoft, x64, 19.42.34435)

Please confirm if you have tested with the latest available version.

Share the svm_err_b_*.md File

svm_err_b_20250107T234343.404_pid9276.md

Additional Context

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions