Menu

STLport 5.2 with VC9

Help
2013-05-25
2013-05-30
  • Edward Diener

    Edward Diener - 2013-05-25

    I am trying to use STLport 5.2 with VC9. I first did a git clone to get the STLport-5.2 branch from the code and then executed from a command prompt 'config msvc9' in the top-level stlport folder. I then opened up a console window using the Visual Studio 2008 Command Prompt in order to setup vc9. I then changed to stlport's build/lib folder and ran 'nmake clean install'. Everything worked without error. Then from within the same console window setup for VC9 I changed to the build/test/unit folder and ran 'nmake clean install'. While compilation was successful I ran into linker errors of the form:

    accum_test.o : error LNK2001: unresolved external symbol "declspec(dllimport)
    public: static void
    cdecl stlp_std::node_alloc::deallocate(void *,unsigned i
    nt)" (
    imp_?deallocate@node_alloc@stlp_std@@SAXPAXI@Z)
    accum_test.o : error LNK2001: unresolved external symbol "
    declspec(dllimport)
    public: static void * cdecl stlp_std::node_alloc::allocate(unsigned int &)"
    (imp_?allocate@node_alloc@stlp_std@@SAPAXAAI@Z)
    alg_test.o : error LNK2001: unresolved external symbol "declspec(dllimport) pu
    blic: static struct stlp_std::priv::_Rb_tree_node_base *
    cdecl stlp_std::priv:
    :Rb_global<bool>::_M_decrement(struct stlp_std::priv::_Rb_tree_node_base )" (
    _imp
    ?_M_decrement@?$_Rb_global@_N@priv@stlp_std@@SAPAU_Rb_tree_node_base@23@PAU
    423@@Z)
    alg_test.o : error LNK2001: unresolved external symbol "declspec(dllimport) pu
    blic: static struct stlp_std::priv::_Rb_tree_node_base *
    cdecl stlp_std::priv:
    :_Rb_global<bool>::_M_increment(struct stlp_std::priv::_Rb_tree_node_base
    )" (

    imp?M_increment@?$_Rb_global@_N@priv@stlp_std@@SAPAU_Rb_tree_node_base@23@PAU
    423@@Z)
    alg_test.o : error LNK2001: unresolved external symbol "declspec(dllimport) pu
    blic: static void
    cdecl stlp_std::priv::_Rb_global<bool>::_Rebalance(struct st
    lp_std::priv::_Rb_tree_node_base ,struct stlp_std::priv::_Rb_tree_node_base * &
    )" (imp_?_Rebalance@?$_Rb_global@_N@priv@stlp_std@@SAXPAU_Rb_tree_node_base@23
    @AAPAU423@@Z)
    alg_test.o : error LNK2001: unresolved external symbol "
    declspec(dllimport) vo
    id cdecl stlp_std::stl_throw_length_error(char const
    )" (imp_?stl_throw
    _length_error@stlp_std@@YAXPBD@Z)
    alg_test.o : error LNK2001: unresolved external symbol "declspec(dllimport) pu
    blic:
    thiscall stlp_std::basic_string<char,class stlp_std::char_traits<char="">,c
    lass stlp_std::allocator<char> >::basic_string<char,class stlp_std::char_traits<="" char="">,class stlp_std::allocator<char> >(class stlp_std::basic_string<char,class stlp_std::char_traits<char="">,class stlp_std::allocator<char> > const &)" (__imp
    ?
    ?0?$basic_string@DV?$char_traits@D@stlp_std@@V?$allocator@D@2@@stlp_std@@QAE@ABV
    01@@Z)

    There is lots more like this but in general it looks like the link stage is not finding the import or static libraries it needs.

    Any idea of what I do to correct this ?

     
  • Petr Ovtchenkov

    Petr Ovtchenkov - 2013-05-29

    Link with stlport.dll?

     
    • Edward Diener

      Edward Diener - 2013-05-30

      I am just using the 'nmake clean install' command from the build/test/unit folder for the STLport-5.2 branch. If it cannot find the STLport import libraries maybe the makefile has been setup incorrectly. I do see stlport.lib, stlport_static.lib, stlport_statix.lib, stlportstld.lib, stlportstld_static.lib, and stlportstld_statix.lib in the lib subdirectory.

       

Log in to post a comment.