Replies: 1 comment 7 replies
-
With that example, you need to define I will suppose
|
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm developing a cross-platform library for Linux and Windows, which should be built and linked as a shared library. (But I want to allow building and linking as static library as well.)
I'm trying to follow this guide (more specifically the "Step-by-step guide" section). But it requires a macro like
FOX_DLL
that is defined when the library is built and linked as a shared library, and a macro likeFOX_DLL_EXPORTS
that is defined when the library is only being built as a shared library.I have some ideas on how to achieve this with Meson, but I'm not sure if I'm doing it correctly or if there is a better way to do it.
I know that the solution most likely revolves around
library() <lang>_shared_args
,declare_dependency() compile_args/link_args
,add_project_arguments
andget_option('default_library')
. But I'm really confused, and I'm not sure which macros should be defined with which methods.How should I define those macros? Should I follow other solutions for defining visibility macros, instead of the one mentioned in that guide?
Beta Was this translation helpful? Give feedback.
All reactions