We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4719 - SDL2 has missed up "SetupAPI" to link in CMakeFiles.txt and therefore can't link
Summary: SDL2 has missed up "SetupAPI" to link in CMakeFiles.txt and therefore can't link
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: build (show other bugs)
Version: HG 2.1
Hardware: All Windows (All)
: P2 critical
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords: target-2.0.10
Depends on:
Blocks:
 
Reported: 2019-07-11 22:13 UTC by Vitaly Novichkov
Modified: 2019-07-12 17:43 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vitaly Novichkov 2019-07-11 22:13:10 UTC
CMake-built SDL2 won't link: https://ci.appveyor.com/project/Wohlstand/sdl-mixer-x/builds/25915186

It has shown missing calls are part of "SetupAPI" library that wasn't linked while CMake build...

For all builds MinGW-w64 8 was in use.
Comment 1 Ozkan Sezer 2019-07-12 10:27:37 UTC
Does it work if you replace 'advapi32' with 'setupapi' in SDL's
CMakeLists.txt at around line 1338?
Comment 2 Vitaly Novichkov 2019-07-12 10:30:40 UTC
Idk, on my end, I have added setupapi, but I kept advapi32 untouched. It has different features are not related to setupapi and I think, removal of advapi32 will cause another error.
Comment 3 Ozkan Sezer 2019-07-12 10:41:42 UTC
Ah yes, RegOpen??()/RegClose??() stuff need advapi32, at the least
(and mingw's gcc adds it automatically behind our back).
Comment 4 Vitaly Novichkov 2019-07-12 10:58:20 UTC
```
gcc adds it automatically
```
I don't think it needs to trust this. The build is targeted to multiple compilers, and this behavior may be different in dependence on a compiler and it's version.
Comment 5 Sam Lantinga 2019-07-12 17:29:07 UTC
Ryan, can you look at this for SDL 2.0.10 release?
Comment 6 Ryan C. Gordon 2019-07-12 17:41:22 UTC
Fixed in https://hg.libsdl.org/SDL/rev/165d577cdc63, thanks!

--ryan.
Comment 7 Vitaly Novichkov 2019-07-12 17:43:08 UTC
Thank you, guys, for a fix!