公司的產品有兩個版本,一個用vs2005編譯,一個用vc6編譯。
新增了個功能,用vs2005編譯后沒問題,用vc6編譯的就不好使。我的機器上沒有裝vc6,所以裝vc6調試。
裝完后編譯出現以下問題:
NOTE: WINVER has been defined as 0x0500 or greater which enables
Windows NT 5.0 and Windows 98 features. When these headers were released,
Windows NT 5.0 beta 1 and Windows 98 beta 2.1 were the current versions.
For this release when WINVER is defined as 0x0500 or greater, you can only
build beta or test applications. To build a retail application,
set WINVER to 0x0400 or visit http://www.microsoft.com/msdn/sdk
to see if retail Windows NT 5.0 or Windows 98 headers are available.
See the SDK release notes for more information.
一番google,原來是SDK沒有更新。
然后更新SDK,給vc6打補丁。
然后繼續編譯,出現頭文件找不到。添加環境變量,解決之。
新添加的環境變量只對新建的進程有效,所以必須重啟vc6才好使。