1 year ago
#373373
bub1ick
Are attributes [[gnu::dllimport]] and [[gnu::dllexport]] in clang cross-platform?
I'm trying to create a cross-platform shared library targeted primarily on Windows and Linux. I'm using Clang. I'm trying to be somewhat consistent with the standard specification that's why I try to get rid of some MSVC extensions where possible. One of them are __declspec(dllimport)
and __declspec(dllexport)
. What I found out is that clang offers attributes [[gnu::dllimport]]
and [[gnu::dllexport]]
. The question is: are they compatible with Linux or I will still have to write macro wrappers to write cross-platform code?
c++
linux
windows
clang
cross-platform
0 Answers
Your Answer