在vc ++下使用makefile生成dll [英] Build dll with makefile under vc++

查看:556
本文介绍了在vc ++下使用makefile生成dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我建立了在vc ++下使用带有makefile的QT Framework的项目(exe),它工作正常:
-----
内部版本:qmake和nmake
重建:qmake -project&qmake&nmake
输出:Debug \ QT_Test.exe
*****
内部版本:qmake和nmake发行版
重建:qmake -project&qmake&nmake版本
输出:Debug \ QT_Test.exe
-----

现在我想做同样的事情,但是我想在输出中有一个dll.

我能怎么做?我需要更改什么?
谢谢

Hello,

I build my project (exe) which use QT Framework with makefile under vc++ It works fine:
-----
Build : qmake & nmake
Rebuild : qmake -project & qmake & nmake
Output : Debug\QT_Test.exe
*****
Build : qmake & nmake release
Rebuild : qmake -project & qmake & nmake release
Output : Debug\QT_Test.exe
-----

Now I want to do the same thing but I want to have a dll in output.

How can I do? what do I need to change ?
Thank you

推荐答案

我建​​议创建一个全新的项目.该项目的目标将是您所需的DLL.将您现有的源代码文件添加到项目中,然后就可以构建东西了.不过要考虑的一点是,通常EXE和DLL具有不同的入口点,并且通常DLL将导出函数,而EXE则不会.如果不对源文件进行更改,则完成此操作可能会很困难.祝你好运. :)
I''d recommend creating a brand new project. The target for the project would be the DLL that you require. Add your existing source code files to the project and things should build. Someting to consider though is that typically EXEs and DLLs have different entry points and usually DLLs will export functions while EXEs will not. Without changes to your source files, accomplishing this may proove difficult. Good Luck. :)


这篇关于在vc ++下使用makefile生成dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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