error LNK2001!!!

Hi,

I have a linking problem after attempting to build the file. The error is as follows:

Cthread.obj : error LNK2001: unresolved external symbol "class std::basic_ostream<char,struct std::char_traits<char> > * Pcthread_stream" ( Pcthread_stream@@3PAV $basic_ostream@DU $char_traits@D@std@@@std@@A)

Could anyone tell me what is wrong and how to go about solving it

Thanks.



Answer this question

error LNK2001!!!

  • BMoscao

    The usual problem in cases like this is that you are either failing to link to some required library or you are failing to include the definition of the specified variable.

  • DSRC

     Jonathan Caves MSFT wrote:
    The usual problem in cases like this is that you are either failing to link to some required library or you are failing to include the definition of the specified variable.

    Thanks!!

    But how to find out the required library I failed to link to I think I have problem with STL library because MS VC++ 6 does not support STL well. So I build and install the lastest STLport. But after all, I get the new error :

    Cthread.obj : error LNK2001: unresolved external symbol "class stlp_std::basic_ostream<char,class stlp_std::char_traits<char> > * Pcthread_stream" ( Pcthread_stream@@3PAV $basic_ostream@DV $char_traits@D@stlp_std@@@stlp_std@@A)

    Now, it's stlp_std :(

    I'm using Microsoft Visual Studio 6.0 SP6


  • DevMark

    For VC6.0 specific issues, please use the newsgroups at http://msdn.microsoft.com/newsgroups as the official support for it already expired.

    Thanks,
    Ayman Shoukry
    VC++ Team


  • Martin Crimes

    Jonathan Caves MSFT wrote:
    The usual problem in cases like this is that you are either failing to link to some required library or you are failing to include the definition of the specified variable.

    Or you are mixing libs compiled in different versions of the compiler. For instance you may be attempting to use a VC++ 6 lib from a VC++ 2005 app.



  • error LNK2001!!!