Project

General

Profile

Linker Errors?

Added by Chris Gilg almost 15 years ago

I am extremely new to wt, I have wt setup and the examples working in Visual Studio 2008. The problem is when I try making a new project and then compile the project I get linker errors that relate to WT. I have googled high and low and was unable to find any information on this. Any help would be greatly appreciated.

Login.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall Wt::WApplication::~WApplication(void)" (??1WApplication`Wt@@UAE`XZ) referenced in function __unwindfunclet$??0HelloApplication`@QAE@ABVWEnvironment@Wt@@`Z$0
1>Login.obj : error LNK2019: unresolved external symbol "public: class Wt::EventSignal<struct Wt::NoClass> & __thiscall Wt::WInteractWidget::enterPressed(void)" (?enterPressed`WInteractWidget@Wt@@QAEAAV?$EventSignal@UNoClass@Wt@@@2`XZ) referenced in function "public: __thiscall HelloApplication::HelloApplication(class Wt::WEnvironment const &)" (??0HelloApplication`@QAE@ABVWEnvironment@Wt@@`Z)
1>Login.obj : error LNK2019: unresolved external symbol "public: class Wt::EventSignal<class Wt::WMouseEvent> & __thiscall Wt::WInteractWidget::clicked(void)" (?clicked`WInteractWidget@Wt@@QAEAAV?$EventSignal@VWMouseEvent@Wt@@@2`XZ) referenced in function "public: __thiscall HelloApplication::HelloApplication(class Wt::WEnvironment const &)" (??0HelloApplication`@QAE@ABVWEnvironment@Wt@@`Z)
1>Login.obj : error LNK2019: unresolved external symbol "public: __thiscall Wt::WText::WText(class Wt::WContainerWidget *)" (??0WText`Wt@@QAE@PAVWContainerWidget@1@`Z) referenced in function "public: __thiscall HelloApplication::HelloApplication(class Wt::WEnvironment const &)" (??0HelloApplication`@QAE@ABVWEnvironment@Wt@@`Z)
1>Login.obj : error LNK2019: unresolved external symbol "public: __thiscall Wt::WBreak::WBreak(class Wt::WContainerWidget *)" (??0WBreak`Wt@@QAE@PAVWContainerWidget@1@`Z) referenced in function "public: __thiscall HelloApplication::HelloApplication(class Wt::WEnvironment const &)" (??0HelloApplication`@QAE@ABVWEnvironment@Wt@@`Z)
1>Login.obj : error LNK2019: unresolved external symbol "public: __thiscall Wt::WLength::WLength(double,enum Wt::WLength::Unit)" (??0WLength`Wt@@QAE@NW4Unit@01@`Z) referenced in function "public: __thiscall HelloApplication::HelloApplication(class Wt::WEnvironment const &)" (??0HelloApplication`@QAE@ABVWEnvironment@Wt@@`Z)
1>Login.obj : error LNK2019: unresolved external symbol "public: __thiscall Wt::WPushButton::WPushButton(class Wt::WString const &,class Wt::WContainerWidget *)" (??0WPushButton`Wt@@QAE@ABVWString@1@PAVWContainerWidget@1@`Z) referenced in function "public: __thiscall HelloApplication::HelloApplication(class Wt::WEnvironment const &)" (??0HelloApplication`@QAE@ABVWEnvironment@Wt@@`Z)
1>Login.obj : error LNK2019: unresolved external symbol "public: void __thiscall Wt::WFormWidget::setFocus(void)" (?setFocus`WFormWidget@Wt@`QAEXXZ) referenced in function "public: __thiscall HelloApplication::HelloApplication(class Wt::WEnvironment const &)" (??0HelloApplication`@QAE@ABVWEnvironment@Wt@@`Z)
1>Login.obj : error LNK2019: unresolved external symbol "public: __thiscall Wt::WLineEdit::WLineEdit(class Wt::WContainerWidget *)" (??0WLineEdit`Wt@@QAE@PAVWContainerWidget@1@`Z) referenced in function "public: __thiscall HelloApplication::HelloApplication(class Wt::WEnvironment const &)" (??0HelloApplication`@QAE@ABVWEnvironment@Wt@@`Z)
1>Login.obj : error LNK2019: unresolved external symbol "public: __thiscall Wt::WText::WText(class Wt::WString const &,class Wt::WContainerWidget *)" (??0WText`Wt@@QAE@ABVWString@1@PAVWContainerWidget@1@`Z) referenced in function "public: __thiscall HelloApplication::HelloApplication(class Wt::WEnvironment const &)" (??0HelloApplication`@QAE@ABVWEnvironment@Wt@@`Z)
1>Login.obj : error LNK2019: unresolved external symbol "public: __thiscall Wt::WString::~WString(void)" (??1WString`Wt@@QAE`XZ) referenced in function "public: __thiscall HelloApplication::HelloApplication(class Wt::WEnvironment const &)" (??0HelloApplication`@QAE@ABVWEnvironment@Wt@@`Z)
1>Login.obj : error LNK2019: unresolved external symbol "public: void __thiscall Wt::WApplication::setTitle(class Wt::WString const &)" (?setTitle`WApplication@Wt@@QAEXABVWString@2@`Z) referenced in function "public: __thiscall HelloApplication::HelloApplication(class Wt::WEnvironment const &)" (??0HelloApplication`@QAE@ABVWEnvironment@Wt@@`Z)
1>Login.obj : error LNK2019: unresolved external symbol "public: __thiscall Wt::WString::WString(char const *,enum Wt::CharEncoding)" (??0WString`Wt@@QAE@PBDW4CharEncoding@1@`Z) referenced in function "public: __thiscall HelloApplication::HelloApplication(class Wt::WEnvironment const &)" (??0HelloApplication`@QAE@ABVWEnvironment@Wt@@`Z)
1>Login.obj : error LNK2019: unresolved external symbol "public: __thiscall Wt::WApplication::WApplication(class Wt::WEnvironment const &)" (??0WApplication`Wt@@QAE@ABVWEnvironment@1@`Z) referenced in function "public: __thiscall HelloApplication::HelloApplication(class Wt::WEnvironment const &)" (??0HelloApplication`@QAE@ABVWEnvironment@Wt@@`Z)
1>Login.obj : error LNK2001: unresolved external symbol "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const __thiscall Wt::WObject::id(void)const " (?id`WObject@Wt@@UBE?BV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@`XZ)
1>Login.obj : error LNK2001: unresolved external symbol "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall Wt::WObject::objectName(void)const " (?objectName`WObject@Wt@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@`XZ)
1>Login.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall Wt::WObject::hasParent(void)const " (?hasParent`WObject@Wt@`UBE_NXZ)
1>Login.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall Wt::WObject::signalConnectionsChanged(void)" (?signalConnectionsChanged`WObject@Wt@`MAEXXZ)
1>Login.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall Wt::WObject::setParent(class Wt::WObject *)" (?setParent`WObject@Wt@@MAEXPAV12@`Z)
1>Login.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall Wt::WObject::setFormData(struct Wt::WObject::FormData const &)" (?setFormData`WObject@Wt@@MAEXABUFormData@12@`Z)
1>Login.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall Wt::WObject::requestTooLarge(int)" (?requestTooLarge`WObject@Wt@@MAEXH`Z)
1>Login.obj : error LNK2001: unresolved external symbol "protected: virtual class Wt::WStatelessSlot * __thiscall Wt::WObject::getStateless(void (__thiscall Wt::WObject::*)(void))" (?getStateless`WObject@Wt@@MAEPAVWStatelessSlot@2@P812@AEXXZ`Z)
1>Login.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Wt::WApplication::refresh(void)" (?refresh`WApplication@Wt@`UAEXXZ)
1>Login.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Wt::WApplication::initialize(void)" (?initialize`WApplication@Wt@`UAEXXZ)
1>Login.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Wt::WApplication::finalize(void)" (?finalize`WApplication@Wt@`UAEXXZ)
1>Login.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall Wt::WApplication::notify(class Wt::WEvent const &)" (?notify`WApplication@Wt@@MAEXABVWEvent@2@`Z)
1>Login.obj : error LNK2001: unresolved external symbol "protected: virtual bool __thiscall Wt::WApplication::isExposed(class Wt::WWidget *)const " (?isExposed`WApplication@Wt@@MBE_NPAVWWidget@2@`Z)
1>Login.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall Wt::WApplication::enableAjax(void)" (?enableAjax`WApplication@Wt@`MAEXXZ)
1>Login.obj : error LNK2019: unresolved external symbol "public: bool __thiscall Wt::WText::setText(class Wt::WString const &)" (?setText`WText@Wt@@QAE_NABVWString@2@`Z) referenced in function "private: void __thiscall HelloApplication::greet(void)" (?greet@HelloApplication@@AAEXXZ)
1>Login.obj : error LNK2019: unresolved external symbol "class Wt::WString __cdecl Wt::operator+(char const *,class Wt::WString const &)" (??HWt`@YA?AVWString@0@PBDABV10@`Z) referenced in function "private: void __thiscall HelloApplication::greet(void)" (?greet@HelloApplication@@AAEXXZ)
1>Login.obj : error LNK2019: unresolved external symbol "int __cdecl Wt::WRun(int,char * *,class Wt::WApplication * (__cdecl*)(class Wt::WEnvironment const &))" (?WRun`Wt@@YAHHPAPADP6APAVWApplication@1@ABVWEnvironment@1@@Z`Z) referenced in function _main
1>Login.obj : error LNK2019: unresolved external symbol "public: class boost::signals::connection __thiscall Wt::EventSignalBase::connect(void (__thiscall Wt::WObject::*)(void),class Wt::WObject *,class Wt::WStatelessSlot *)" (?connect`EventSignalBase@Wt@@QAE?AVconnection@signals@boost@@P8WObject@2@AEXXZPAV62@PAVWStatelessSlot@2@`Z) referenced in function "public: class boost::signals::connection __thiscall Wt::EventSignal<class Wt::WMouseEvent>::connect<class HelloApplication,class HelloApplication>(class HelloApplication *,void (__thiscall HelloApplication::*)(void))" (??$connect`VHelloApplication@@V1@@?$EventSignal@VWMouseEvent@Wt@@@Wt@@QAE?AVconnection@signals@boost@@PAVHelloApplication@@P85@AEXXZ`Z)
1>Login.obj : error LNK2019: unresolved external symbol "private: class Wt::WStatelessSlot * __thiscall Wt::WObject::isStateless(void (__thiscall Wt::WObject::*)(void))" (?isStateless`WObject@Wt@@AAEPAVWStatelessSlot@2@P812@AEXXZ`Z) referenced in function "public: class boost::signals::connection __thiscall Wt::EventSignal<class Wt::WMouseEvent>::connect<class HelloApplication,class HelloApplication>(class HelloApplication *,void (__thiscall HelloApplication::*)(void))" (??$connect`VHelloApplication@@V1@@?$EventSignal@VWMouseEvent@Wt@@@Wt@@QAE?AVconnection@signals@boost@@PAVHelloApplication@@P85@AEXXZ`Z)
1>Login.obj : error LNK2019: unresolved external symbol "protected: void __thiscall Wt::EventSignalBase::exposeSignal(void)" (?exposeSignal`EventSignalBase@Wt@`IAEXXZ) referenced in function "public: class boost::signals::connection __thiscall Wt::EventSignal<class Wt::WMouseEvent>::connect<class HelloApplication,class HelloApplication>(class HelloApplication *,void (__thiscall HelloApplication::*)(void))" (??$connect`VHelloApplication@@V1@@?$EventSignal@VWMouseEvent@Wt@@@Wt@@QAE?AVconnection@signals@boost@@PAVHelloApplication@@P85@AEXXZ`Z)
1>C:\Users\Gilg\Documents\Projects\Login\Debug\Login.wt.exe : fatal error LNK1120: 34 unresolved externals

Replies (3)

RE: Linker Errors? - Added by ruliang ge almost 15 years ago

Hi,Gilg

I have some suggestion.

Firstly, you can run the INSTALL project in the examples in Visual Studio 2008.

And then this project will generate the WT libraries and includes files in C:\Program Files\WT.

OK! You can use these WT libraries and includes to link in your own project

RE: Linker Errors? - Added by Chris Gilg almost 15 years ago

Thanks for the response I figured out what was wrong. I wasnt directly referencing the libraries, only the the directories. After I took a look at the examples I was able to fix the problem.

RE: Linker Errors? - Added by Daniel Sanchez about 12 years ago

What was the fix you found? Because I am encountering the same linker errors above even after I directly reference wt.lib from the "WT/lib" folder (which I added to the additional library directories btw) or any of the other libraries in there.

I also added in the necessary Boost directories to the project and it still does not go at all.

It's driving me crazy because I can't figure out what's wrong!

    (1-3/3)