CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Apr 2012
    Posts
    29

    Question Unresolved external symbol

    Hi, I´m migrating a VC++ 6.0 project to VC++ 2010.

    I am sure I am linking the right libraries but still getting this error:

    1>LBW_Base_Private.obj : error LNK2019: unresolved external symbol "public: __thiscall LBW_Parser::~LBW_Parser(void)" (??1LBW_Parser@@QAE@XZ) referenced in function __unwindfunclet$??0LBW_Base@@AAE@XZ$0
    1>LBW_Base_Private.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall LBW_FieldList::~LBW_FieldList(void)" (??1LBW_FieldList@@UAE@XZ) referenced in function __unwindfunclet$??0LBW_Base@@AAE@XZ$0
    1>LBW_Base_Private.obj : error LNK2019: unresolved external symbol "public: __thiscall LBW_Parser::LBW_Parser(void)" (??0LBW_Parser@@QAE@XZ) referenced in function "private: __thiscall LBW_Base::LBW_Base(void)" (??0LBW_Base@@AAE@XZ)
    1>LBW_Base_Private.obj : error LNK2019: unresolved external symbol "public: __thiscall LBW_FieldList::LBW_FieldList(void)" (??0LBW_FieldList@@QAE@XZ) referenced in function "private: __thiscall LBW_Base::LBW_Base(void)" (??0LBW_Base@@AAE@XZ)
    1>LBW_Base_Private.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall LBW_Base::IsFieldIndexed(char const *)" (?IsFieldIndexed@LBW_Base@@UAE_NPBD@Z)
    1>LBW_Base_Private.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall LBW_Base::CanHaveQuote(char const *)" (?CanHaveQuote@LBW_Base@@UAE_NPBD@Z)
    1>LBW_Base_Private.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall LBW_Base::FullIndexed(char const *)" (?FullIndexed@LBW_Base@@UAE_NPBD@Z)
    1>LBW_Base_Private.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall LBW_Base::IsMultiValued(char const *)" (?IsMultiValued@LBW_Base@@UAE_NPBD@Z)
    1>LBW_Base_Private.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall LBW_Base::GetGroup(char const *)" (?GetGroup@LBW_Base@@UAEHPBD@Z)
    1>LBW_Base_Private.obj : error LNK2001: unresolved external symbol "private: virtual int __thiscall LBW_Base::ItemFound(char *)" (?ItemFound@LBW_Base@@EAEHPAD@Z)
    1>LBW_Base_Private.obj : error LNK2001: unresolved external symbol "private: virtual int __thiscall LBW_Base::Update(int)" (?Update@LBW_Base@@EAEHH@Z)
    1>LBW_Base_Private.obj : error LNK2001: unresolved external symbol "private: virtual int __thiscall LBW_Base::VerifyIndex(int,int)" (?VerifyIndex@LBW_Base@@EAEHHH@Z)
    1>LBW_Base_Private.obj : error LNK2001: unresolved external symbol "private: virtual int __thiscall LBW_Base::Return(int)" (?Return@LBW_Base@@EAEHH@Z)
    1>LBW_Base_Private.obj : error LNK2001: unresolved external symbol "private: virtual int const * __thiscall LBW_Base::IntR(int,int)" (?IntR@LBW_Base@@EAEPBHHH@Z)
    1>LBW_Base_Private.obj : error LNK2001: unresolved external symbol "private: virtual double const * __thiscall LBW_Base:oubleR(int,int)" (?DoubleR@LBW_Base@@EAEPBNHH@Z)
    1>LBW_Base_Private.obj : error LNK2001: unresolved external symbol "private: virtual char * __thiscall LBW_Base::String(int,int)" (?String@LBW_Base@@EAEPADHH@Z)
    1>LBW_Base_Private.obj : error LNK2001: unresolved external symbol "private: virtual int const * __thiscall LBW_Base::BoolR(int,int)" (?BoolR@LBW_Base@@EAEPBHHH@Z)
    1>LBW_Base_Private.obj : error LNK2001: unresolved external symbol "private: virtual class C_Date const * __thiscall LBW_Base:ateR(int,int)" (?DateR@LBW_Base@@EAEPBVC_Date@@HH@Z)
    1>LBW_Base_Private.obj : error LNK2001: unresolved external symbol "private: virtual class C_Time const * __thiscall LBW_Base::TimeR(int,int)" (?TimeR@LBW_Base@@EAEPBVC_Time@@HH@Z)
    1>LBW_Base_Private.obj : error LNK2001: unresolved external symbol "private: virtual char const * __thiscall LBW_Base::UserName(void)" (?UserName@LBW_Base@@EAEPBDXZ)
    1>LBW_Base_Private.obj : error LNK2001: unresolved external symbol "private: virtual char const * __thiscall LBW_Base::UserPassword(void)" (?UserPassword@LBW_Base@@EAEPBDXZ)
    1>LBW_Base_Private.obj : error LNK2001: unresolved external symbol "private: virtual char const * __thiscall LBW_Base::ServerName(void)" (?ServerName@LBW_Base@@EAEPBDXZ)
    1>LBW_Base_Private.obj : error LNK2001: unresolved external symbol "private: virtual char const * __thiscall LBW_Base::ClientName(void)" (?ClientName@LBW_Base@@EAEPBDXZ)
    1>LBW_Base_Private.obj : error LNK2019: unresolved external symbol "public: class ATL::CStringT<char,class StrTraitMFC_DLL<char,class ATL::ChTraitsCRT<char> > > __thiscall LBW_Base::GetOperator(char const *)" (?GetOperator@LBW_Base@@QAE?AV?$CStringT@DV?$StrTr aitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@PBD@Z) referenced in function "public: virtual class CASCString __thiscall LBW_Base::GetQueryOperator(char *)" (?GetQueryOperator@LBW_Base@@UAE?AVCASCString@@PAD @Z)
    1>LBW_Base_Private.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall LBW_Base::~LBW_Base(void)" (??1LBW_Base@@UAE@XZ) referenced in function "public: virtual void * __thiscall LBW_Base::`scalar deleting destructor'(unsigned int)" (??_GLBW_Base@@UAEPAXI@Z)

    I did dumpbin with lbwparser.lib for example and I saw that LBWParser::LBWParser(void) and LBWParser::~LBWParser(void) are there.

    can you help me?

  2. #2
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: Unresolved external symbol

    Are you actually linking that library in your project's build?

  3. #3
    Join Date
    Apr 2012
    Posts
    29

    Re: Unresolved external symbol

    Yes, I put lbwparser.lib; in Additional Dependencies on the Input page of Linker on Project Properties.

  4. #4
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: Unresolved external symbol

    Quote Originally Posted by michaelhsilva View Post
    Yes, I put lbwparser.lib; in Additional Dependencies on the Input page of Linker on Project Properties.
    Really sounds like the .lib is missing. Are you sure you added it to the correct configuration - Debug vs. Release?

  5. #5
    Join Date
    Apr 2012
    Posts
    29

    Re: Unresolved external symbol

    Humm, but yes both configrations are Release.

  6. #6
    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    3,654

    Re: Unresolved external symbol

    Is lbwparser.lib built with an older compiler/linker?
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are, by
    definition, not smart enough to debug it.
    - Brian W. Kernighan

    To enhance your chance's of getting an answer be sure to read
    http://www.codeguru.com/forum/announ...nouncementid=6
    and http://www.codeguru.com/forum/showthread.php?t=366302 before posting

    Refresh your memory on formatting tags here
    http://www.codeguru.com/forum/misc.php?do=bbcode

    Get your free MS compiler here
    https://visualstudio.microsoft.com/vs

  7. #7
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Unresolved external symbol

    Quote Originally Posted by michaelhsilva View Post
    Hi, I´m migrating a VC++ 6.0 project to VC++ 2010.
    1) You're also supposed to rebuild any static libraries you're using to VC 2010. You cannot use VC 6.0 static libraries in VC 2010. Did you rebuild all static libraries that your project uses?

    2) If you are using a DLL instead of a static library, and that DLL uses any C++ classes or types, that DLL has to be rebuilt with VC 2010.

    3) If your application in VC 6.0 was not a Unicode app, you must make sure all of your modules you're building in VC 2010 are built with MBCS (or no character set) selected in the project options. Otherwise you will get undefined externals for char-based function calls.

    Other than that, you're the one sitting at the computer with the files, and we do not have access to your computer. So if you say you're doing everything correctly, we can't help you (which means obviously you're not doing something correctly, and we would have no idea what it is).

    Regards,

    Paul McKenzie

  8. #8
    Join Date
    Apr 2012
    Posts
    29

    Re: Unresolved external symbol

    Sorry Paul I did not have the inttention.

    I am linking just the libs I´ve already built to VS 2010, something is not correct. I took this project and added just one cpp file to isolate the problem. If I make the project as a static library the error disapear.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured