nvim-treesitter-cpp-tools
nvim-treesitter-cpp-tools copied to clipboard
MYLIBRARY_EXPORT dll export not work
if the class written as
class MyClass{
//some method
};
it works fine.
but
class MYLIBRARY_EXPORT MyClass{
//some method
};
not works.
Im not sure about the implementation of functions for this case. Could you give an example?
class MYLIBRARY_EXPORT MyClass{
void test();
};
Should it be
void MyClass::test() {
}
Also I'm curious about the use cases of MYLIBRARY_EXPORT. Is it a macro? Is it used for Windows?
yes , for windows.
#ifdef WIN32
#ifdef MY_LIB
#define MYLIBRARY_EXPORT __declspec(dllexport)
#else
#define MYLIBRARY_EXPORT __declspec(dllimport)
#endif
#else
#define MYLIBRARY_EXPORT
#endif
class MYLIBRARY_EXPORT MyClass{
void test();
};
A proper solution cannot be given until this issue is fixed from the cpp treesitter parser