Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3.2k
Add shared library support when building with meson#2918
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:devel
Are you sure you want to change the base?
Conversation
Build type will be set by default_library, which default to static.However, shared libraries can be built, by passing -Ddefault_library=shared
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@## devel #2918 +/- ##======================================= Coverage 90.99% 90.99% ======================================= Files 198 198 Lines 8597 8597 ======================================= Hits 7822 7822 Misses 775 775 |
horenmar commentedOct 11, 2024
Does this handle exporting symbols? |
Colum31 commentedOct 28, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Yes, when running |
Colum31 commentedNov 20, 2024
Or which symbols do you mean? |
horenmar commentedNov 22, 2024
The important platform for this is Windows. Linux has all symbols visible by default, but Windows uses the better option, which is that all symbols are hidden by default. CMake hasWINDOWS_EXPORT_ALL_SYMBOLS for this. |
shahsb left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM!
stephanlachnit commentedJul 27, 2025
There is the However, this only works when each symbol has the appropriate symbol visibility annotation, which is not the case as far as I can see. There is also no equivalent for |
Description
Building shared libraries is currently not supported, when building with meson.
This PR enables building shared libraries, by passing
-Ddefault_library=shared.When this option is not passed, a static library is built.