Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

STLPort 5.1.3 link errors in vc2005

Developers
2007-04-06
2013-05-13
  • HolmesConan
    HolmesConan
    2007-04-06

    Today i update my stlport to 5.1.3, but there is an error
    when i used /MTd or /MT to build my simple project. it just ok
    but if i used /MDd or /MD to build it. the linker can't find the reference to some symbols.

    Could somebody help me?

     
    • > Could somebody help me? 

      Not with so few information. Post linker errors if you want some help.

      First hypothesis when moving from a STLport version to an other is that you haven't rebuild everything. Do not count on MSVC to find out what has to be rebuild, it is very bad at that, force rebuild of everything that was depending on STLport.

       
    • HolmesConan
      HolmesConan
      2007-04-07

      Yes I have rebuild it for many many times. but it there.

      i have rebuild the stlport and my project. but it is no use

      i am a chinese.so i use a chinese version vs2005.and the error infomation is also chinese.
      so i did'nt post it up.

      there are the errors:
      1>testt.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: class stlp_std::basic_ostream<char,class stlp_std::char_traits<char> > & __thiscall stlp_std::basic_ostream<char,class stlp_std::char_traits<char> >::operator<<(class stlp_std::basic_ostream<char,class stlp_std::char_traits<char> > & (__cdecl*)(class stlp_std::basic_ostream<char,class stlp_std::char_traits<char> > &))" (__imp_??6?$basic_ostream@DV?$char_traits@D@stlp_std@@@stlp_std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z),该符号在函数 _wmain 中被引用
      1>testt.obj : error LNK2001: 无法解析的外部符号 "__declspec(dllimport) class stlp_std::basic_ostream<char,class stlp_std::char_traits<char> > stlp_std::cout" (__imp_?cout@stlp_std@@3V?$basic_ostream@DV?$char_traits@D@stlp_std@@@1@A)
      1>testt.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: void __thiscall stlp_std::basic_ostream<char,class stlp_std::char_traits<char> >::_M_put_nowiden(char const *)" (__imp_?_M_put_nowiden@?$basic_ostream@DV?$char_traits@D@stlp_std@@@stlp_std@@QAEXPBD@Z),该符号在函数 "class stlp_std::basic_ostream<char,class stlp_std::char_traits<char> > & __cdecl stlp_std::operator<<<class stlp_std::char_traits<char> >(class stlp_std::basic_ostream<char,class stlp_std::char_traits<char> > &,char const *)" (??$?6V?$char_traits@D@stlp_std@@@stlp_std@@YAAAV?$basic_ostream@DV?$char_traits@D@stlp_std@@@0@AAV10@PBD@Z) 中被引用
      1>testt.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: class stlp_std::basic_ostream<char,class stlp_std::char_traits<char> > & __thiscall stlp_std::basic_ostream<char,class stlp_std::char_traits<char> >::flush(void)" (__imp_?flush@?$basic_ostream@DV?$char_traits@D@stlp_std@@@stlp_std@@QAEAAV12@XZ),该符号在函数 "class stlp_std::basic_ostream<char,class stlp_std::char_traits<char> > & __cdecl stlp_std::endl<char,class stlp_std::char_traits<char> >(class stlp_std::basic_ostream<char,class stlp_std::char_traits<char> > &)" (??$endl@DV?$char_traits@D@stlp_std@@@stlp_std@@YAAAV?$basic_ostream@DV?$char_traits@D@stlp_std@@@0@AAV10@@Z) 中被引用
      1>testt.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: class stlp_std::basic_ostream<char,class stlp_std::char_traits<char> > & __thiscall stlp_std::basic_ostream<char,class stlp_std::char_traits<char> >::put(char)" (__imp_?put@?$basic_ostream@DV?$char_traits@D@stlp_std@@@stlp_std@@QAEAAV12@D@Z),该符号在函数 "class stlp_std::basic_ostream<char,class stlp_std::char_traits<char> > & __cdecl stlp_std::endl<char,class stlp_std::char_traits<char> >(class stlp_std::basic_ostream<char,class stlp_std::char_traits<char> > &)" (??$endl@DV?$char_traits@D@stlp_std@@@stlp_std@@YAAAV?$basic_ostream@DV?$char_traits@D@stlp_std@@@0@AAV10@@Z) 中被引用

      my simple code is

      #include <iostream>

      using namespace std;

      int main(int argc, char *argv[])
      {
          cout<<"Hello"<<endl;
          return 0;
      }

      and another question:
      the nmake product two kinds of .dll file
      stlportd.5.1.dll  and stlportd_x.5.1.dll
      after i used nmake -f msvc.mak install
      it copy the stlportd_x.5.1.dll and .lib files to the bin and lib folders.but the linker ask me to the stlportd.5.1.lib
      why?  what's the different between stlportd_x.5.1.dll and stlport.5.1.dll
      and i have tried to copy the stlportd.5.1.dll and .lib file to the folders manually
      and also rename the two files of stlportd_x.5.1.dll and lib to stlport.5.1.dll and lib.so the errors occurs.

       
    • HolmesConan
      HolmesConan
      2007-04-08

      I have look at the process during the compiling.and I found that all files are compiled with /MT or /MTd,
      these is no /MD or /MDdis
      perhaps it is because I  used --rtl-static option

      and who can explain the differences between stlport(d)_x.5.1.dll and stlport(d).5.1.dll

       
    • The '_x' is added when you use the --rtl-* options to signal the special link mode to the native runtime.

      You shouldn't play with --rtl-* options if you don't know what you are doing. Try first to use STLport with a default build. To use MSVC 2005 simply use 'configure -c msvc8' and nothing else. Once it works check documentation of the --rtl-* options doing a 'configure --help' and check that you really need those.