原来的是vc 6的工程,SDK不明确
现在手里有vs 2005 + windows sdk for vista(v6.1)(Windows Software Development Kit (SDK) for Windows Server 2008 and .NET Framework 3.5 Release Notes)+XP SP3
注意点
1.在stdafx.h里面增加,同时去掉C/C++预处理妻里面对WINVER和_WIN32_WINNT 的定义
#ifndef WINVER // Allow use of features specific to Windows 95 and Windows NT 4 or later.
#define WINVER 0x0501 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
#endif
#ifndef _WIN32_WINNT // Allow use of features specific to Windows NT 4 or later.
#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
#endif
#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
#define _WIN32_WINDOWS 0x0501 // Change this to the appropriate value to target Windows Me or later.
#endif
#ifndef _WIN32_IE // Allow use of features specific to IE 4.0 or later.
#define _WIN32_IE 0x0601 // Change this to the appropriate value to target IE 5.0 or later.
#endif
2.头文件包含顺序一定要注意,否则会出现refclock.h里面报错之类莫名其妙的错误
include
C:\Program Files\Microsoft SDKs\Windows\v6.1\Include\dx /* base 头文件目录 */
C:\Program Files\Microsoft SDKs\Windows\v6.1\Include /* windows sdk 目录 */
$(VCInstallDir)include /* 下面这三个目录顺序不要错 */
$(VCInstallDir)PlatformSDK\include
$(VCInstallDir)atlmfc\include
3.该工程默认是unicode的,因此base 库也要用unicode 版本,否则会联接报错
CFilterNetSender.obj : error LNK2019: 无法解析的外部符号 "public: __thiscall CPosPassThru::CPosPassThru
后续,上述编译后运行起来后似乎会崩溃,有时间再记
阅读(1978) | 评论(0) | 转发(0) |