简体   繁体   English

编译用于Python或SWIG模块创建的C-dll,如何继续?

[英]Compiling C-dll for Python OR SWIG-module creation, how to continue?

I reference this file " kbdext.c " and its headerfile listed on http://www.docdroppers.org/wiki/index.php?title=Writing_Keyloggers (the listings are at the bottom). 我引用了该文件“ kbdext.c ”及其头文件,该文件列在http://www.docdroppers.org/wiki/index.php?title=Writing_Keyloggers上 (列表位于底部)。

I've been trying to compile this into a dll for use in Python or Visual Basic , but have not succeeded. 我一直试图将其编译dll以在Python或Visual Basic中使用 ,但没有成功。 I'm not familiar with C or GCC to sort out the problems or do the dll compile correctly. 我不熟悉C或GCC来解决问题或正确编译dll。 (I also get an error about snprintf not being declared when doing a regular compile of all the files). (在对所有文件进行常规编译时,我也收到有关未声明snprintf的错误)。

What are the steps I should do to make all functions available for other languages and external apps? 我应该采取什么步骤使所有功能都可用于其他语言和外部应用程序?

Or is it perhaps easier to use SWIG and make a python module, instead of compiling a DLL? 还是使用SWIG并制作python模块而不是编译DLL可能更容易?

我已经成功地用GCC编译了dll,并且能够在C中导入其功能。我还没有在VB和Python中测试导入,但是看不到为什么会造成问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM