znone / call_thunk

Take the member function of the C++ class as the callback function of the C function
Apache License 2.0
36 stars 9 forks source link

Visual Studio 2019 build failed #1

Open panovr opened 4 years ago

panovr commented 4 years ago

I tried call_thunk with Visual Studio 2019 with some errors. May you try to build call_thunk with Visual Studio 2019? Thanks!

znone commented 4 years ago

The Makefile in the project directory is designed for GCC under Linux. If you use Visual Studio, you should refer to the Makefile in the directory sample\window, or create a Visual Studio solution.You just need to add call_thunk.cpp/call_thunk.h to your project.

panovr commented 4 years ago

I also tried g++ with Ubuntu 18.04, but get some errors when compiling thunk_code_x64.cpp.

znone commented 4 years ago

Please use call_thunk.cpp, which generates libthunk.so.

panovr commented 4 years ago

It seems that call_thunk.cpp includes "call_thunk.h", and call_thunk.h includes thunk_code_x64.cpp.

znone commented 4 years ago

thunk_code_x64.cpp and thunk_code_x86.cpp are implementations of thunk_code.cpp.

ruoleng commented 2 years ago

I tried call_thunk with Visual Studio 2019 with some errors. May you try to build call_thunk with Visual Studio 2019? Thanks! Modify the "thunk_code_x64.cpp"file from

struct thunk_code .....

to


#include "call_thunk.h"

namespace call_thunk { struct thunk_code ..... }