老外的SDK,自带的例程中用到了std,可是编译时有几个类总是报错:
CyAcquisitionPage.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall CyChannel::CyChannel(unsigned short,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_
??0CyChannel@@QAE@GABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
CyAcquisitionPage.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const & __thiscall CyChannel::GetName(void)const " (__imp_?GetNa
me@CyChannel@@QBEABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
CyApp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall CyXMLDocument::CyXMLDocument(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0CyXMLDocument@@Q
AE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
CyDeviceDlg.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall CyXMLDocument::CyXMLDocument(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0CyXMLDocum
ent@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
CyApp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: unsigned long __thiscall CyXMLDocument::CreateDocument(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_?Cre
ateDocument@CyXMLDocument@@QAEKABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
CyDeviceDlg.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const & __thiscall CyAdapterID::GetIdentifier(void)const " (__imp_?Get
Identifier@CyAdapterID@@QBEABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
CyDeviceDlg.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: unsigned long __thiscall CyCameraRegistry::GetName(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)const " (__imp_?G
etName@CyCameraRegistry@@QBEKAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
好像每个都有std参数,大侠帮我看看是怎么回事啊?老外总是说他们那边编译没问题!郁闷死了

解决方案 »

  1.   

    看是用了DLL,你的程序里设置了LIB文件的路径没有??
      

  2.   

    设置了啊,而且我看了文件夹下面,就设置的LIB路径下面有库文件,应该没有遗漏的。
    实在不知道问题出在哪里了
      

  3.   

    把实现放到和声明放到一起
    或者用支持分离模型的编译器
    vc6.0是不支持的
    去试试 2001 error
      

  4.   

    一旦实现分离了
    必须使用支持分离模型的编译器
    我是指STL类的话
    注意看下一下 
      

  5.   

    ...
    如果是STL对象
    是在在你调用时产生实例点
    才会找定义[member template Fun也样]
    如果你不实例
    永远都不会报错
      

  6.   

    唉,出来了居然。我不明白是为什么,我随便打开一个报错的类的头文件,注掉其中一个成员函数的return,编译,再取消注释,再编译,通过了。这是什么问题啊,怪异。。