Replies: 1 comment
-
Oh, actually, it just occurred to me that even the example given above has its code inside a function, while mine doesn't yet. Maybe that's the only problem and I don't need BOOL APIENTRY Dllmain. duh. I'll try and get back to you guys. Thanks. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Normally, when you make a DLL in Visual Studio, it automatically gives you a file with contents like this:
But the pybind11 examples go something like this:
The #include at the top seems to imply that the above is the entire file, but it appears you actually have to use BOOL APIENTRY. I tried the following:
And I got errors like
'->': trailing return type is not allowed after a non-function declarator
So, which case in the switch statement do you put your code under? Or do you just ignore the switch statement? And also, I'm trying to use pybind11 with juce, and when I make a shared library with projucer, it doesn't include the above dllmain.cpp file in the project. So, do I have to make it myself and just add it to the project and put my code somewhere within the dllmain function? Thanks.
Beta Was this translation helpful? Give feedback.
All reactions