Skip to content

Comments

[misc] make custom definition of DEVPKEY_Device_BusReportedDeviceDesc static#108

Closed
geovie wants to merge 1 commit intopbatard:masterfrom
Timeular:master
Closed

[misc] make custom definition of DEVPKEY_Device_BusReportedDeviceDesc static#108
geovie wants to merge 1 commit intopbatard:masterfrom
Timeular:master

Conversation

@geovie
Copy link
Contributor

@geovie geovie commented Dec 20, 2017

When linking against some windows libraries (SetupApi.lib probably) i get the following linker error:
_DEVPKEY_Device_BusReportedDeviceDesc already defined.
By making the custom definition in libwdi static the user can link against windows libraries without having duplicate symbols.

… static

* prevents  '_DEVPKEY_Device_BusReportedDeviceDesc already defined' linker error in user code
@pbatard
Copy link
Owner

pbatard commented Dec 20, 2017

I don't mind applying this patch, but can you tell what toolchain you are using so I can try to replicate the issue? Is it VS2017? MinGW? Something else?

@geovie
Copy link
Contributor Author

geovie commented Dec 20, 2017

I'm using VS2017 toolchain

@geovie
Copy link
Contributor Author

geovie commented Jan 3, 2018

Testcase to replicate the issue. Change the LIBWDIPATH in PropertySheet.props before building.

Without the change from this PR the linking will fail, with the change it will succeed
libwdi-pr108-test.zip

@pbatard
Copy link
Owner

pbatard commented Jan 5, 2018

Applied! Apologies for the delay and many thanks for the pull request.

@pbatard pbatard closed this in b4a47ba Jan 5, 2018
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