export missed symbol#2293
Merged
Merged
Conversation
vitaut
reviewed
May 18, 2021
45c037f to
5a6edc3
Compare
Contributor
Author
|
@vitaut I've updated the error description and marked other missed symbols for export. It might be a good idea to set the visibility to hidden by default because this leaves more room for compiler optimizations. In CMake, the preferred way for generating export macros is to use the GenerateExportHeader module which creates a header with toolchain specific export defines. On a downside, this introduces an additional header. Is this something |
Contributor
No, we try to keep the number of headers small and especially avoid any generated headers. |
Contributor
|
There are some build failures. |
Contributor
Author
|
I could reproduce the problem with |
Enable `-fvisibility=hidden` and `-fvisibility-inlines-hidden` by default in CI builds to ensure all public symbols are exported correctly.
Contributor
|
Thank you! |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When compiling with
-fvisibility=hidden, linker errors occur because a symbol was not marked as being exported. Thefinalkeyword is not necessary for a class that is already marked asfinal.How to reproduce:
CXXFLAGS=-fvisibility=hidden cmake -S . -B build/ -DBUILD_SHARED_LIBS:BOOL=ON -GNinja cmake --build build/Log output