用c编写的代码中的dll [英] dll from code written in c

查看:102
本文介绍了用c编写的代码中的dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我收到了一个项目。这个项目的代码是用C语言编写的,我想在dll中对它进行转换,以便以后可以使用这些函数。我正在使用Microsoft Visual Studio 2010.我怎么办?

请帮助我

谢谢

Hello,
i received a project. the code of this project is written in C and i want to transform it in dll so i could use the functions later. i am using Microsoft Visual studio 2010. How could i proceed?
Please help me
Thanks

推荐答案

请参阅:

http://msdn.microsoft.com/en-us /library/16ya5xae.aspx [ ^ ],

http://msdn.microsoft.com/en -us / library / w8c3skw3.aspx [ ^ ],

http://msdn.microsoft.com /en-us/library/da6zd0a4.aspx [ ^ ]。



我建议在Visual Studio中创建一个C ++ DLL项目并添加C文件和correspo将头文件添加到它。 C ++项目可以毫无问题地托管C代码。然后你可以选择用C ++包装一些C代码或直接导出C函数。



-SA
Please see:
http://msdn.microsoft.com/en-us/library/16ya5xae.aspx[^],
http://msdn.microsoft.com/en-us/library/w8c3skw3.aspx[^],
http://msdn.microsoft.com/en-us/library/da6zd0a4.aspx[^].

I would advise to create a C++ DLL project in Visual Studio and add C files and corresponding header files to it. A C++ project can host C code without any problem. And then you may choose to wrap some C code in C++ or just export C functions directly.

—SA


这篇关于用c编写的代码中的dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆