error全在头文件里!!!!

kobethesole 2008-04-14 10:01:14
小弟编译guliverkli_20030820(开源的Media player classic) 到了filters这一步,batch build之后结果:
1>f:\visualstudio2005\smartdevices\sdk\pocketpc2003\include\stdlib.h(1041) : error C2065: '_JBLEN' : undeclared identifier
1>f:\visualstudio2005\smartdevices\sdk\pocketpc2003\include\winnt.h(3019) : error C2146: syntax error : missing ';' before identifier 'ContextRecord'
1>f:\visualstudio2005\smartdevices\sdk\pocketpc2003\include\winnt.h(3019) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>f:\visualstudio2005\smartdevices\sdk\pocketpc2003\include\winnt.h(3019) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>f:\visualstudio2005\smartdevices\sdk\pocketpc2003\include\winbase.h(1481) : error C2146: syntax error : missing ';' before identifier 'LPCONTEXT'
1>f:\visualstudio2005\smartdevices\sdk\pocketpc2003\include\winbase.h(1481) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>f:\visualstudio2005\smartdevices\sdk\pocketpc2003\include\winbase.h(1481) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>f:\visualstudio2005\smartdevices\sdk\pocketpc2003\include\winbase.h(2222) : error C2061: syntax error : identifier 'LPCONTEXT'
1>f:\visualstudio2005\smartdevices\sdk\pocketpc2003\include\winbase.h(2230) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>f:\visualstudio2005\smartdevices\sdk\pocketpc2003\include\winbase.h(2230) : error C2143: syntax error : missing ',' before '*'
1>f:\visualstudio2005\smartdevices\sdk\pocketpc2003\include\excpt.h(56) : error C2040: 'PCONTEXT' : '_CONTEXT *' differs in levels of indirection from 'int'
1>f:\visualstudio2005\vc\ce\include\crtdefs.h(100) : fatal error C1189: #error : ERROR: Use of C runtime library internal header file.
怎么会这样子!!!!
...全文
1112 15 打赏 收藏 转发到动态 举报
写回复
用AI写文章
15 条回复
切换为时间正序
请发表友善的回复…
发表回复
lizzy1209 2011-05-16
  • 打赏
  • 举报
回复
error C2065: '_JBLEN' : undeclared identifier
c:\dxsdk\include\stdlib.h(1042) : error C2057: expected constant expression
c:\dxsdk\include\stdlib.h(1042) : error C2466: cannot allocate an array of constant size 0


类似的问题怎么解决呢?
O(∩_∩)O谢谢
whywen_MoJian 2008-07-09
  • 打赏
  • 举报
回复
偶也是这个问题..郁闷呀..
CDDAReader.obj : error LNK2019: unresolved external symbol "class ATL::CStringT <char,class StrTraitMFC_DLL <char,class ATL::ChTraitsCRT <char> > > __cdecl CStringFromGUID(struct _GUID const &)" (?CStringFromGUID@@YA?AV?$CStringT@DV?$StrTraitMFC_DLL@DV?

如何解决??
babycathq2000 2008-04-21
  • 打赏
  • 举报
回复
我觉得好像你用的库有些问题,重新编译一下。
kobethesole 2008-04-17
  • 打赏
  • 举报
回复
我几乎把所有相关的LIB路径都放在TOOLs\Options\VC++ Directories\Liberary files下了,难道发生了冲突么
此外还有好几个warning:
Linking...
Creating library Debug/cddareader.lib and object Debug/cddareader.exp
CDDAReader.obj : warning LNK4217: locally defined symbol _wcscpy imported in function "public: virtual long __stdcall CCDDAReader::GetCurFile(wchar_t * *,struct _AMMediaType *)" (?GetCurFile@CCDDAReader@@UAGJPAPA_WPAU_AMMediaType@@@Z)
CDDAReader.obj : warning LNK4217: locally defined symbol __CrtDbgReportW imported in function "public: bool __thiscall ATL::CAutoVectorPtr<unsigned char>::Allocate(unsigned int)" (?Allocate@?$CAutoVectorPtr@E@ATL@@QAE_NI@Z)
stdafx.obj : warning LNK4049: locally defined symbol __CrtDbgReportW imported
mfcs80d.lib(stdafx.obj) : warning LNK4049: locally defined symbol __CrtDbgReportW imported
stdafx.obj : warning LNK4217: locally defined symbol _wcslen imported in function "wchar_t * __stdcall ATL::CharLowerWFake(wchar_t *)" (?CharLowerWFake@ATL@@YGPA_WPA_W@Z)
mfcs80d.lib(stdafx.obj) : warning LNK4049: locally defined symbol _wcslen imported
stdafx.obj : warning LNK4217: locally defined symbol _wcscpy_s imported in function "void __cdecl ATL::Checked::wcscpy_s(wchar_t *,unsigned int,wchar_t const *)" (?wcscpy_s@Checked@ATL@@YAXPA_WIPB_W@Z)
mfcs80d.lib(stdafx.obj) : warning LNK4049: locally defined symbol _wcscpy_s imported
stdafx.obj : warning LNK4217: locally defined symbol _malloc imported in function "public: static void * __cdecl ATL::CCRTAllocator::Allocate(unsigned int)" (?Allocate@CCRTAllocator@ATL@@SAPAXI@Z)
mfcs80d.lib(stdafx.obj) : warning LNK4049: locally defined symbol _malloc imported
stdafx.obj : warning LNK4217: locally defined symbol _free imported in function "public: static void __cdecl ATL::CCRTAllocator::Free(void *)" (?Free@CCRTAllocator@ATL@@SAXPAX@Z)
mfcs80d.lib(stdafx.obj) : warning LNK4217: locally defined symbol _free imported in function "void __cdecl ATL::AtlConvAllocMemory<char>(char * *,int,char *,int)" (??$AtlConvAllocMemory@D@ATL@@YAXPAPADHPADH@Z)
stdafx.obj : warning LNK4217: locally defined symbol _calloc imported in function "void __cdecl ATL::AtlConvAllocMemory<char>(char * *,int,char *,int)" (??$AtlConvAllocMemory@D@ATL@@YAXPAPADHPADH@Z)
mfcs80d.lib(stdafx.obj) : warning LNK4049: locally defined symbol _calloc imported
stdafx.obj : warning LNK4217: locally defined symbol __recalloc imported in function "void __cdecl ATL::AtlConvAllocMemory<char>(char * *,int,char *,int)" (??$AtlConvAllocMemory@D@ATL@@YAXPAPADHPADH@Z)
mfcs80d.lib(stdafx.obj) : warning LNK4049: locally defined symbol __recalloc imported
CDDAReader.obj : error LNK2019: unresolved external symbol "class ATL::CStringT<char,class StrTraitMFC_DLL<char,class ATL::ChTraitsCRT<char> > > __cdecl CStringFromGUID(struct _GUID const &)" (?CStringFromGUID@@YA?AV?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@ABU_GUID@@@Z) referenced in function "void __cdecl RegisterSourceFilter(struct _GUID const &,struct _GUID const &,char const *,char const *,...)" (?RegisterSourceFilter@@YAXABU_GUID@@0PBD1ZZ)
CDDAReader.obj : error LNK2019: unresolved external symbol __imp__sscanf referenced in function "public: bool __thiscall CCDDAStream::Load(wchar_t const *)" (?Load@CCDDAStream@@QAE_NPB_W@Z)
CDDAReader.obj : error LNK2019: unresolved external symbol __imp___ismbcdigit referenced in function "public: bool __thiscall CCDDAStream::Load(wchar_t const *)" (?Load@CCDDAStream@@QAE_NPB_W@Z)
stdafx.obj : error LNK2019: unresolved external symbol __imp___resetstkoflw referenced in function "bool __cdecl ATL::_ATL_SAFE_ALLOCA_IMPL::_AtlVerifyStackAvailable(unsigned long)" (?_AtlVerifyStackAvailable@_ATL_SAFE_ALLOCA_IMPL@ATL@@YA_NK@Z)
mfcs80d.lib(stdafx.obj) : error LNK2001: unresolved external symbol __imp___resetstkoflw
Debug/cddareader.ax : fatal error LNK1120: 4 unresolved externals
Build log was saved at "file://f:\StormCodec\guliverkli_20030820\src\filters\reader\cddareader\Debug\BuildLog.htm"
cddareader - 6 error(s), 16 warning(s)
========== Build: 0 succeeded, 39 failed, 105 up-to-date, 0 skipped ==========
我都快疯了,把所有相关的头文件放在include files 里错误更多了也不行,天啊 !!
babycathq2000 2008-04-17
  • 打赏
  • 举报
回复
看样子像,你用了什么库
tangx100 2008-04-17
  • 打赏
  • 举报
回复
这可能是你连接哪个动态库中函数造成的吧
kobethesole 2008-04-17
  • 打赏
  • 举报
回复
对呀 这个问题没了 可是
CDDAReader.obj : error LNK2019: unresolved external symbol "class ATL::CStringT <char,class StrTraitMFC_DLL <char,class ATL::ChTraitsCRT <char> > > __cdecl CStringFromGUID(struct _GUID const &)" (?CStringFromGUID@@YA?AV?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@ABU_GUID@@@Z) referenced in function "void __cdecl RegisterSourceFilter(struct _GUID const &,struct _GUID const &,char const *,char const *,...)" (?RegisterSourceFilter@@YAXABU_GUID@@0PBD1ZZ)
[b]CDDAReader.obj : error LNK2019: unresolved external symbol __imp__sscanf referenced in function "public: bool __thiscall CCDDAStream::Load(wchar_t const *)" (?Load@CCDDAStream@@QAE_NPB_W@Z)
CDDAReader.obj : error LNK2019: unresolved external symbol __imp___ismbcdigit referenced in function "public: bool __thiscall CCDDAStream::Load(wchar_t const *)" (?Load@CCDDAStream@@QAE_NPB_W@Z)
stdafx.obj : error LNK2019: unresolved external symbol __imp___resetstkoflw referenced in function "bool __cdecl ATL::_ATL_SAFE_ALLOCA_IMPL::_AtlVerifyStackAvailable(unsigned long)" (?_AtlVerifyStackAvailable@_ATL_SAFE_ALLOCA_IMPL@ATL@@YA_NK@Z)
mfcs80d.lib(stdafx.obj) : error LNK2001: unresolved external symbol __imp___resetstkoflw
Debug/cddareader.ax : fatal error LNK1120: 4 unresolved externals
Build log was saved at "file://f:\StormCodec\guliverkli_20030820\src\filters\reader\cddareader\Debug\BuildLog.htm"
cddareader - 6 error(s), 16 warning(s)
========== Build: 0 succeeded, 40 failed, 104 up-to-date, 0 skipped
如之奈何 ~!!
babycathq2000 2008-04-16
  • 打赏
  • 举报
回复
你是不是用vs2005打开的原来的vc6的工程?
tangx100 2008-04-15
  • 打赏
  • 举报
回复
建议先包括的winnt.h、winbase.h头文件删掉,重新添加进去进行编译,并且在需调用的文件中要包括头文件名
路过路人乙 2008-04-15
  • 打赏
  • 举报
回复
应该包括以上1楼,2楼的问题。。
babycathq2000 2008-04-15
  • 打赏
  • 举报
回复
路径设置好了?!
kobethesole 2008-04-15
  • 打赏
  • 举报
回复
谢谢楼上的几位,为题貌似已经解决,可是新的问题又出现了,还好只有一个:
f:\visualstudio2005\vc\ce\include\crtdefs.h(100) : fatal error C1189: #error : ERROR: Use of C runtime library internal header file.
1>Build log was saved at "file://f:\StormCodec\guliverkli_20030820\src\filters\transform\bufferfilter\Debug lib\BuildLog.htm"
1>bufferfilter - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
  • 打赏
  • 举报
回复
没包含windows.h?

13,873

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧