c++ - Using a cpp project's dll & .lib file in python -
Then with a standard CPP compiler, link my application from the .lib file and then on runtime, unless the dll is executable As in the same folder, everything works magically ..
But in Python, what is the role of .lib file? I understand that you can import ctypes from ctypes
dllHandle = cdll.LoadLibrary ("C: \\ filename.dll") or ctypes.WinDLL ("C: \" using DLL . \ Filename.dll ") But what is not using the .lib file? Why is it not necessary in CPP projects?
If zero foo () is exported in test .dll and apply this function to main () in the application Is done when you test.lib The linking creates the application, then the linker resolves the call to the exported function. But another way to achieve this is to load test.dll at runtime, function address for zero FU Receiving and inviting it (you can mention it). It does not need to add any link for test.lib.You are doing the same in Python and test.lib plays a role here. / P> < / Html>
Comments
Post a Comment