Microsoft Visual C++ 6.0 各类工程配置说明(二)
来源:互联网 发布:淘宝怎么找人代付款 编辑:程序博客网 时间:2024/05/22 10:43
预定义:与(4.1)相比,增加了_WINDLL,_AFXDLL的定义
编译参数:没有太大区别。
连接参数:/nologo/dll /incremental:yes /pdb:"Debug/Win32DllDemo.pdb"/debug/machine:I386/out:"Debug/Win32DllDemo.dll"/implib:"Debug/Win32DllDemo.lib" /pdbtype:sept
可以看出,(4.1) 里连接的很多库消失了,这时,项目4变成了类似于项目2中的设置。编程时需要注意,项目4的stdafx.h仅包含了<windows.h>,此时如果要用MFC的类,需要自己加入MFC的几个头文件(<afxwin.h>、<afxext.h>等),并且将#include <windows.h>和DllMain入口函数注释掉!
(4.3) Use MFC in a Static DLL
使用MFC DLL的方式Shared和Static之间的区别与上述项目类似,不再做比较。
5.Win32 Static Library项目
预编译头文件stdafx.h(可能没有这个文件):
不使用MFC,仅仅#define WIN32_LEAN_AND_MEAN,而如果使用MFC,内容如下:
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afx.h> #include <afxwin.h>
(5.1) Not Using MFC
预定义:WIN32,_DEBUG,_MBCS,_LIB,新出现了符号_LIB
编译参数:/nologo/MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB"/Fp"Debug/W32StaPrehead.pch" /Yu"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD/GZ /c
注意到使用的Run-time library参数为/MLd。
库参数:这个项目没有Link设置页,代替的是Library页,参数如下:/nologo /out:"Debug/W32StaPrehead.lib"
(5.2) Use MFC in a Shared DLL
预定义:WIN32,_DEBUG,_WINDOWS,_MBCS,_AFXDLL,与项目1(MFC Exe)设置相同。
编译参数:注意使用的Run-time library参数为/MDd。
库参数:没有太大区别。
(5.3) Use MFC in a Static DLL
编译参数:注意使用的Run-time library参数为/MTd。
6.Win32 Application项目
预编译头文件stdafx.h
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <windows.h> // Windows Header Files:
#include <stdlib.h> #include <malloc.h> #include <memory.h> #include <tchar.h> // C RunTime Header Files
出现了Win32程序的入口函数WinMain。
这个项目,Project->settings->General中设置使用MFC的方式,一般设为Not Using MFC,否则程序结构的改动比较大。从Not Using MFC到使用MFC的改变,对连接的库的影响类似于项目4(Win32 DLL)。
(6.1) Not Using MFC
预定义:WIN32,_DEBUG,_WINDOWS,_MBCS
编译参数:/nologo/MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB"/Fp"Debug/W32StaPrehead.pch" /Yu"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD/GZ /c
注意到使用的Run-time library参数为/MLd。
连接参数:kernel32.libuser32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.libole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo/subsystem:windows /incremental:yes /pdb:"Debug/W32AppDemo.pdb" /debug/machine:I386 /out:"Debug/W32AppDemo.exe" /pdbtype:sept
(6.2) Use MFC in a Shared DLL
编译参数:注意使用的Run-time library参数为/MDd。
(6.3) Use MFC in a Static DLL
编译参数:注意使用的Run-time library参数为/MTd。
- Microsoft Visual C++ 6.0 各类工程配置说明(二)
- Microsoft Visual C++ 6.0 各类工程配置说明(一)
- Microsoft Visual C++ 6.0 各类工程配置说明(三)
- Microsoft Visual C++ 6.0 各类工程配置说明(三)
- Microsoft Visual C++ 6.0 各类工程配置说明
- Visual C++6.0 工程文件说明
- 配置Visual C++工程
- visual C++6.0工程中文件作用的说明
- 配置Microsoft Visual SourceSafe 2005
- MicroSoft Visual Studio2012配置OpenGl
- 毕业设计工程配置说明
- hibernate 工程配置说明
- Microsoft Visual Studio 2008实用配置(一):显示行号
- 在Visual Studio中给C语言工程的exe文件添加图标和版本说明
- 请问如何在Microsoft Visual InterDev 6.0 中建立工程!!!急!!急!!
- Visual stdio的工程文件说明
- Visual Stdio 2010工程配置
- Microsoft Visual SourceSafe 2005 下载与配置
- 浅析网络编程之Socket模型(上)
- ms agent
- 浅析网络编程之Socket模型(下)
- NET设计模式(2):单件模式(Singleton Pattern)
- 同步/异步与阻塞/非阻塞的区别
- Microsoft Visual C++ 6.0 各类工程配置说明(二)
- YUV2RGB
- Microsoft Visual C++ 6.0 各类工程配置说明(三)
- Microsoft Visual C++ 6.0 各类工程配置说明(三)
- Microsoft Visual C++ 6.0 各类工程配置说明
- 学好VC++的十大良好习惯
- Windows蓝屏代码含意速查表
- PHP类实例教程(六):构造函数
- 用C#中用默认浏览器打开网址