Skip to content

Fix Windows build error: unresolved if_nametoindex symbol - #497

Open
FeBe95 wants to merge 1 commit into
snowflakedb:masterfrom
FeBe95:patch-1
Open

Fix Windows build error: unresolved if_nametoindex symbol#497
FeBe95 wants to merge 1 commit into
snowflakedb:masterfrom
FeBe95:patch-1

Conversation

@FeBe95

@FeBe95 FeBe95 commented Mar 31, 2026

Copy link
Copy Markdown

Adds iphlpapi.lib to the Windows library list in config.w32.

Recent versions of the bundled libcurl_a.lib reference if_nametoindex (used for IPv6 scoped address handling), which on Windows lives in iphlpapi.dll. Without linking against iphlpapi.lib, the build fails with:

libcurl_a.lib(url.obj) : error LNK2019: unresolved external symbol "__imp_if_nametoindex" referenced in function "zonefrom_url".
C:\php-sdk\phpmaster\vs17\x64\php-src\x64\Release_TS\php_pdo_snowflake.dll : fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: ""link.exe" @"C:\php-sdk\phpmaster\vs17\x64\php-src\x64\Release_TS\resp\PDO_SNOWFLAKE_GLOBAL_OBJS.txt" 

iphlpapi.lib is a standard Windows SDK library and is always available in VS16/VS17 build environments.

Command that triggered this error:

.\scripts\run_build_pdo_snowflake.bat x64 Release VS17 8.4.17 C:\php-sdk

@FeBe95
FeBe95 requested a review from a team as a code owner March 31, 2026 18:11
@github-actions

github-actions Bot commented Mar 31, 2026

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@FeBe95

FeBe95 commented Mar 31, 2026

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

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

Successfully merging this pull request may close these issues.

1 participant