boostorg / dll

Library for comfortable work with DLL and DSO
https://boost.org/libs/dll
52 stars 43 forks source link

Callbacks not functioning. But libcurl callbacks are fine #26

Closed kenkit closed 5 years ago

kenkit commented 5 years ago

I noticed this when I turned most of my code into a callback based api. The problem happens when classes are involved.

kenkit commented 5 years ago

This is an example where it failed


 ProgressCallback Progress;
    ...

        result = compressor.DoCompress((SevenZip::ProgressCallback*)&Progress);
kenkit commented 5 years ago

I've tried a number of ways to get around this but it has not worked.

kenkit commented 5 years ago

I create my plugins like this https://gist.github.com/xiongjia/50198166b65cb5dab13a339ac9843618

kenkit commented 5 years ago

This is one of the libraries where it has failed https://github.com/getnamo/7zip-cpp

kenkit commented 5 years ago

Fixed bug was on my side for not declaring the methods as static