-
April 23rd, 2012, 12:53 PM
#1
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?
-
April 23rd, 2012, 01:01 PM
#2
Re: Unresolved external symbol
Are you actually linking that library in your project's build?
-
April 23rd, 2012, 01:07 PM
#3
Re: Unresolved external symbol
Yes, I put lbwparser.lib; in Additional Dependencies on the Input page of Linker on Project Properties.
-
April 23rd, 2012, 01:42 PM
#4
Re: Unresolved external symbol
Originally Posted by michaelhsilva
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?
-
April 23rd, 2012, 01:51 PM
#5
Re: Unresolved external symbol
Humm, but yes both configrations are Release.
-
April 23rd, 2012, 03:14 PM
#6
Re: Unresolved external symbol
Is lbwparser.lib built with an older compiler/linker?
-
April 23rd, 2012, 11:28 PM
#7
Re: Unresolved external symbol
Originally Posted by michaelhsilva
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
-
April 24th, 2012, 08:14 AM
#8
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|