Yes, I started integrate another way ~ ~
This method uses C++,python as glue, for the MATLAB call, originally is compiles on the Linux to run, I need to put it on the Windows x64 to run up ~ ~
On the Linux platform, Python calls C is done in this way:
var = cdll ('test.so')
Where. So is a file on Linux called a shared library, similar to a. dll file for Windows. So take it for granted, we need to replace this file with Test.dll after Windows is called.
This step is not difficult either, by adding the keyword __declspec (dllexport) before the function declaration that needs to provide the external interface.
The sample code looks like this:
#define Dll_api __declspec (dllexport)void foo ();
When you're done, change the VS project configuration type to a dynamic library (. dll) and compile to get the Test.dll file
The statements that are called in Python are as follows:
var = cdll ('test.dll')
Now, in Python, you can happily invoke functions in C + + ~~o (^▽^) o
Python calls the C function