'BTNS_BUTTON' : undeclared identifier,网上说缺少SDK,但是我把VS2005的sdk加入,仍然错误
C:\Documents and Settings\Administrator\桌面\WholeProject\MotleyFool_src\MotleyFool\MFToolbar.cpp(35) : error C2065: 'TBSTYLE_EX_MIXEDBUTTONS' : undeclared identifier
C:\Documents and Settings\Administrator\桌面\WholeProject\MotleyFool_src\MotleyFool\MFToolbar.cpp(58) : error C2065: 'BTNS_BUTTON' : undeclared identifier
C:\Documents and Settings\Administrator\桌面\WholeProject\MotleyFool_src\MotleyFool\MFToolbar.cpp(58) : error C2065: 'BTNS_AUTOSIZE' : undeclared identifier
C:\Documents and Settings\Administrator\桌面\WholeProject\MotleyFool_src\MotleyFool\MFToolbar.cpp(58) : error C2065: 'BTNS_SHOWTEXT' : undeclared identifier
MotleyFool.cpp
ReflectionWnd.cpp
StockBar.cpp
Generating Code...
Error executing cl.exe.
MotleyFool.dll - 4 error(s), 0 warning(s)
下面是我查到的解决方法
但是我还是没有解决
大侠帮忙看看
谢谢
Hello,
You need to make sure the library in the SDK not the Visual Studio is the one the linker picks up. I first tried adding the path of the SDK library using Tools->Options->Directories Tab. I placed the SDK path at the top of the order, but this did not solve the error. Instead, I added the path of the SDK library here:
Project->Settings->C++ Tab->Category Proprocessor.
In the additional include directories, I entered the SDK path. After that all worked ok.
I hope it helps.
You can check for previous threads. Several of them deal with your problem. If I remember, you need to install the SDK platform. To use the dll, you need to register it, the project do it for you. You can read the final part of the tutorial to understand how to use it in IE.
need platform sdk.
下载之后将sdk里的头文件设置为最前.
问题点数:100、回复次数:5Top
1 楼huzhangyou(信仰(http://www.libing.net.cn))回复于 2006-03-01 18:37:28 得分 0
This is determined by your environment options.
Go to tools->options and click on the directories tab, then choose "include files" in the "show directories for" combo. The SDK install should have added its path to the list, but the order is important; if a file is in two directories, it will use the one it finds first, so move your SDK directory to the top of the list, then do a "rebuild all". The VC *editor* may still pull up the wrong file, but the compiler should get the new version. If all else fails, you can put the full path in the #include, but remember that will break on anyone else's machine.
这个是解决方法
Top
2 楼huzhangyou(信仰(http://www.libing.net.cn))回复于 2006-03-01 18:51:46 得分 0
经过修改以后又出现如下错误
Compiling...
StdAfx.cpp
c:\program files\microsoft visual studio\vc98\include\comdef.h(695) : error C2065: 'IAsyncSetup' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(710) : error C2065: 'IClassAccess' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(712) : error C2065: 'IClassAdmin' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(715) : error C2065: 'IClassRefresh' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(750) : error C2065: 'IEnumClass' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(762) : error C2065: 'IEnumPackage' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(1078) : error C2065: 'IXMLElementNotificationSink' : undeclared identifier
Error executing cl.exe.
MotleyFool.dll - 7 error(s), 0 warning(s)Top
3 楼rageliu(天气好了就去长白山看水怪去了,嘿嘿...)回复于 2006-03-01 19:06:20 得分 20
缺少头文件Top
4 楼DentistryDoctor(不在无聊中无奈,就在沉默中变态)回复于 2006-03-01 19:07:32 得分 80
1。请安装较新的PSDK.
//Defined in CommonCtrl.h
#if (_WIN32_IE >= 0x0500)
#define BTNS_BUTTON TBSTYLE_BUTTON // 0x0000
#define BTNS_SEP TBSTYLE_SEP // 0x0001
#define BTNS_CHECK TBSTYLE_CHECK // 0x0002
#define BTNS_GROUP TBSTYLE_GROUP // 0x0004
#define BTNS_CHECKGROUP TBSTYLE_CHECKGROUP // (TBSTYLE_GROUP | TBSTYLE_CHECK)
#define BTNS_DROPDOWN TBSTYLE_DROPDOWN // 0x0008
#define BTNS_AUTOSIZE TBSTYLE_AUTOSIZE // 0x0010; automatically calculate the cx of the button
#define BTNS_NOPREFIX TBSTYLE_NOPREFIX // 0x0020; this button should not have accel prefix
#if (_WIN32_IE >= 0x0501)
#define BTNS_SHOWTEXT 0x0040 // ignored unless TBSTYLE_EX_MIXEDBUTTONS is set
#endif // 0x0501
#define BTNS_WHOLEDROPDOWN 0x0080 // draw drop-down arrow, but without split arrow section
#endif
看了上面的定义,你应该明白,你应该在你的StdAfx.h中将_WIN32_IE定义为0x0500或更高。Top
5 楼huzhangyou(信仰(http://www.libing.net.cn))回复于 2006-03-01 19:11:49 得分 0
使用了VS2003的SDK终于好使了
谢谢大家
第一个进来的接分Top
相关问题
- undeclared identifier错误,help!!!
- SDK编程的一个错误,求助!!!!
- 用SDK写的程序LINK错误,为什么?
- directx sdk 7和vc 6.0的错误问题,高分100
- 编译时的错误,搞不明白~?(用了DirectX9 SDK)
- .NET Framework SDK Beta 1安装时出现error 2894.internal Error 2894.126 错误如何解决??
- 为什么我的SDK程序运行会有下面两个错误?
- VC6.0+最新SDK,使用2000下的API函数时出现未定义错误
- 使用最新SDK时遇到的一个怪问题(LNK2001错误)
- 为什么我的程序出现error C2065: 'CoInitializeSecurity' : undeclared identifier错误




