1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

error LNK2001: unresolved external symbol

Discussion in 'C' started by Placebo, Apr 29, 2010.

  1. Placebo

    Placebo New Member

    Joined:
    Apr 29, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    hi

    i just installed the visual studio 2010

    when i run my project (that fully compiled with vs 2008 without any error ) i get following :
    Code:
    1>------ Build started: Project: Graphics, Configuration: Debug Win32  ------
    1>  SDL_draw.lib : MSIL .netmodule or module compiled with /GL found;  restarting link with /LTCG; add /LTCG to the link command line to  improve linker performance
    1>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG'  specification
    1>     Creating library C:\Users\Sina  Miandashti\Desktop\Graphics\Debug\Graphics.lib and object C:\Users\Sina  Miandashti\Desktop\Graphics\Debug\Graphics.exp
    1>LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of  other libs; use /NODEFAULTLIB:library
    1>graphics.obj : error LNK2001: unresolved external symbol  "__declspec(dllimport) protected: char const * __thiscall  std::basic_string<char,struct std::char_traits<char>,class  std::allocator<char> >::_Myptr(void)const "  (__imp_?_Myptr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IBEPBDXZ)
    1>graphics.obj : error LNK2001: unresolved external symbol  "__declspec(dllimport) public: class std::basic_string<char,struct  std::char_traits<char>,class std::allocator<char> >  __thiscall std::basic_ostringstream<char,struct  std::char_traits<char>,class std::allocator<char>  >::str(void)const "  (__imp_?str@?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ)
    1>graphics.obj : error LNK2001: unresolved external symbol  "__declspec(dllimport) public: __thiscall  std::basic_ostringstream<char,struct  std::char_traits<char>,class std::allocator<char>  >::basic_ostringstream<char,struct  std::char_traits<char>,class std::allocator<char> >(int)"   (__imp_??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z)
    1>graphics.obj : error LNK2001: unresolved external symbol  "__declspec(dllimport) public: char const * __thiscall  std::basic_string<char,struct std::char_traits<char>,class  std::allocator<char> >::c_str(void)const "  (__imp_?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ)
    1>graphics.obj : error LNK2001: unresolved external symbol  "__declspec(dllimport) public: __thiscall  std::basic_string<char,struct std::char_traits<char>,class  std::allocator<char> >::~basic_string<char,struct  std::char_traits<char>,class std::allocator<char>  >(void)"  (__imp_??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ)
    1>graphics.obj : error LNK2001: unresolved external symbol  "__declspec(dllimport) public: void __thiscall  std::basic_ostringstream<char,struct  std::char_traits<char>,class std::allocator<char>  >::`vbase destructor'(void)"  (__imp_??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ)
    1>C:\Users\Sina Miandashti\Desktop\Graphics\Debug\Graphics.exe :  fatal error LNK1120: 6 unresolved externals
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped  ==========
    
    thanks for any helps for compiling this
     
  2. Placebo

    Placebo New Member

    Joined:
    Apr 29, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    link for my files :
    h t t p ://musicbase.ir/Graphics.rar
     
  3. Placebo

    Placebo New Member

    Joined:
    Apr 29, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    or

    h t t p ://x7.to/vz873y
     
  4. Poonamol

    Poonamol New Member

    Joined:
    Mar 31, 2010
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    0
    Please check the settings of project.
    Linked dlls are missing here.
     
  5. Placebo

    Placebo New Member

    Joined:
    Apr 29, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    how?

    can u plz do that for me ?

    i uploaded the folder of the project
     
  6. Poonamol

    Poonamol New Member

    Joined:
    Mar 31, 2010
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    0
    You are saying that its compiling fine in VS 2008...right?

    So Open it in VS 2008 and check the settings from project menu.
    Go to Project->Settings and check all tags into that with respective file availability in the path.
    They should be same for other editor also.
    Some dependent header files / dlls/ lib files are missing from the folder which is reauired to create an object file. Hence the errors.
     
  7. Placebo

    Placebo New Member

    Joined:
    Apr 29, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    the setting in 2010 is exactly is the same in 2008 of the project

    but in 2010 i get that error

    im a php developer and not professional on workin with .NET stuff
     

Share This Page