Skip to content

Fix linker failures compiling Swift on Windows #6819

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

Merged
merged 1 commit into from
Jan 15, 2017
Merged

Fix linker failures compiling Swift on Windows #6819

merged 1 commit into from
Jan 15, 2017

Conversation

hughbe
Copy link
Contributor

@hughbe hughbe commented Jan 14, 2017

Fallout from #6460 where we changed from linking rpcrt4.lib to ole32.lib. I assumed that since ole32 included rpc APIs, they would work. I was wrong! Instead, this caused linker errors for undefined symbols for the following:

  • UUIDToString is an undefined symbol, as we link ole32.lib instead of Rpcrt4.lib. Instead, use ole32.lib StringFromCLSID. Adjust for this API using wchar_t.
  • UUIDFromString is an undefined symbol, for the same reason. Instead, use ole32's CLSIDFromString. Adjust for this API using wchar_t.
  • UUIDFromNil is an undefined symbol, for the same reason. Instead, just create a zero-initialized Guid.
  • UUIDCompare is an undefined symboll, for the same reason. Instead, just compare memory

@slavapestov
Copy link
Contributor

@swift-ci Please smoke test

@slavapestov slavapestov merged commit 62b12ed into swiftlang:master Jan 15, 2017
@hughbe hughbe deleted the uuid-linkers branch January 15, 2017 23:14
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.

2 participants