Skip to content
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

New solution for tests in static libraries ! (MSVC) #106

Closed
Lectem opened this issue Dec 7, 2017 · 0 comments
Closed

New solution for tests in static libraries ! (MSVC) #106

Lectem opened this issue Dec 7, 2017 · 0 comments

Comments

@Lectem
Copy link
Contributor

Lectem commented Dec 7, 2017

I encountered some issues today because of the static linking defaults of MSVC which removes unreferenced symbols, and found a solution that doesn't involve build system tricks !

You can actually fix this by using the /OPT:NOREF linker flag.
Obvisouly it is not always what you want as it might make bigger .lib files, but I think it is fine if you only add it for Tests enabled builds.

@onqtam onqtam closed this as completed in 82f96fc Feb 6, 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

No branches or pull requests

1 participant