陆其明吧 关注:196贴子:6,653
  • 6回复贴,共1

老出现LNK2001: unresolved external symbol之类的错误,大家帮帮

收藏回复

  • 61.150.43.*
我是dshow的初学者,用VC6.0 directshow SDK(summer 2004)版本的,baseclasses也编译了,头文件和库文件目录也加进去了,但是编译总是出现同种类型的错误,比如编译Directshow编程指南的simpleplayer会出现以下错误:
CDXGraph.obj : error LNK2001: unresolved external symbol "int __cdecl wsprintfWInternal(unsigned short *,unsigned short const *,...)" (?wsprintfWInternal@@YAHPAGPBGZZ)
Debug/SimplePlayer.exe : fatal error LNK1120: 1 unresolved externals
编译FilterTitleOverlay会出现一大堆错误,错误的类型也是LNK2001,比如会出现下面错误:
strmbasd.lib(amfilter.obj) : error LNK2001: unresolved external symbol @_RTC_CheckStackVars@8
strmbasd.lib(transfrm.obj) : error LNK2001: unresolved external symbol @_RTC_CheckStackVars@8
strmbasd.lib(transip.obj) : error LNK2001: unresolved external symbol @_RTC_CheckStackVars@8
PS:我用VS2008搭建的环境可以编译通过simpleplayer


1楼2010-04-16 11:06回复
    编译baseclasses时我编译的是DEBUG,非debug_unicode


    禁言 |2楼2010-04-16 11:10
    回复
      其中头文件和库文件是这样设置的
      头文件目录
      C:\Program Files\Microsoft DirectX 9.0 SDK (Summer 2004)\Include
      C:\PROGRAM FILES\MICROSOFT DIRECTX 9.0 SDK (SUMMER 2004)\SAMPLES\C++\DIRECTSHOW\BASECLASSES
      C:\PROGRAM FILES\MICROSOFT DIRECTX 9.0 SDK (SUMMER 2004)\SAMPLES\C++\DIRECTSHOW\COMMON
      C:\PROGRAM FILES\MICROSOFT PLATFORM SDK FOR WINDOWS SERVER 2003 R2\INCLUDE
      库文件目录:
      C:\Program Files\Microsoft DirectX 9.0 SDK (Summer 2004)\Lib
      C:\PROGRAM FILES\MICROSOFT DIRECTX 9.0 SDK (SUMMER 2004)\SAMPLES\C++\DIRECTSHOW\BASECLASSES\DEBUG(用VS2008的debug模式生成)
      C:\PROGRAM FILES\MICROSOFT PLATFORM SDK FOR WINDOWS SERVER 2003 R2\LIB


      禁言 |3楼2010-04-16 11:17
      回复
        已解决


        禁言 |4楼2010-04-16 17:20
        回复
          回复:4楼
          请问高手是怎么解决的????


          禁言 |5楼2010-06-18 10:08
          回复
            把Code Generation 里 project option里的/GZ删除后 编译就通过了


            禁言 |6楼2011-07-28 11:30
            收起回复