Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MYLIBRARY_EXPORT dll export not work #21

Open
paopaol opened this issue May 20, 2022 · 3 comments
Open

MYLIBRARY_EXPORT dll export not work #21

paopaol opened this issue May 20, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@paopaol
Copy link
Contributor

paopaol commented May 20, 2022

if the class written as

class MyClass{
//some method
};

it works fine.

but

class  MYLIBRARY_EXPORT MyClass{
//some method
};

not works.

@Badhi Badhi added the bug Something isn't working label May 20, 2022
@Badhi
Copy link
Owner

Badhi commented May 20, 2022

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?

@paopaol
Copy link
Contributor Author

paopaol commented May 21, 2022

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();
};

@Badhi
Copy link
Owner

Badhi commented May 21, 2022

A proper solution cannot be given until this issue is fixed from the cpp treesitter parser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants