Project

General

Profile

Undefined references after Wt upgrade

Added by Jeremy Minton about 12 years ago

I recently upgraded to Wt 3.2.3 and a number of my programs will no longer compile, citing undefined reference errors.

I was running Wt and Boost downloaded from the repository and my programs compiled fine - they still do on my laptop with that set-up. I then downloaded wt3.2.3 and compiled from source with many errors. After a lot of reinstalling I got what looks like a clean install and received undefined reference errors:

g++  -g main.cpp familyWorksApp.o model.o dboSession.o makePages/makePages.o  -o "familyworks" -lwt -lJM_WtConversionFunctions -lboost_signals -lboost_system -lwtdbosqlite3 -lwtdbo -lwthttp  
model.o: In function `void Wt::Dbo::Session::implDelete<Client>(Wt::Dbo::MetaDbo<Client>&)':
model.cpp:(.text._ZN2Wt3Dbo7Session10implDeleteI6ClientEEvRNS0_7MetaDboIT_EE[_ZN2Wt3Dbo7Session10implDeleteI6ClientEEvRNS0_7MetaDboIT_EE]+0x70): undefined reference to `Wt::Dbo::Exception::Exception(std::string const&, std::string const&)'
model.o: In function `void Wt::Dbo::Session::implSave<Client>(Wt::Dbo::MetaDbo<Client>&)':
model.cpp:(.text._ZN2Wt3Dbo7Session8implSaveI6ClientEEvRNS0_7MetaDboIT_EE[_ZN2Wt3Dbo7Session8implSaveI6ClientEEvRNS0_7MetaDboIT_EE]+0x82): undefined reference to `Wt::Dbo::Exception::Exception(std::string const&, std::string const&)'
model.o: In function `Wt::Dbo::Session::Mapping<Client>* Wt::Dbo::Session::getMapping<Client>() const':
model.cpp:(.text._ZNK2Wt3Dbo7Session10getMappingI6ClientEEPNS1_7MappingIT_EEv[_ZNK2Wt3Dbo7Session10getMappingI6ClientEEPNS1_7MappingIT_EEv]+0x173): undefined reference to `Wt::Dbo::Exception::Exception(std::string const&, std::string const&)'
model.o: In function `void Wt::Dbo::Session::implDelete<Worker>(Wt::Dbo::MetaDbo<Worker>&)':
model.cpp:(.text._ZN2Wt3Dbo7Session10implDeleteI6WorkerEEvRNS0_7MetaDboIT_EE[_ZN2Wt3Dbo7Session10implDeleteI6WorkerEEvRNS0_7MetaDboIT_EE]+0x70): undefined reference to `Wt::Dbo::Exception::Exception(std::string const&, std::string const&)'
model.o: In function `void Wt::Dbo::Session::implSave<Worker>(Wt::Dbo::MetaDbo<Worker>&)':
model.cpp:(.text._ZN2Wt3Dbo7Session8implSaveI6WorkerEEvRNS0_7MetaDboIT_EE[_ZN2Wt3Dbo7Session8implSaveI6WorkerEEvRNS0_7MetaDboIT_EE]+0x82): undefined reference to `Wt::Dbo::Exception::Exception(std::string const&, std::string const&)'
model.o:model.cpp:(.text._ZNK2Wt3Dbo7Session10getMappingI6WorkerEEPNS1_7MappingIT_EEv[_ZNK2Wt3Dbo7Session10getMappingI6WorkerEEPNS1_7MappingIT_EEv]+0x173): more undefined references to `Wt::Dbo::Exception::Exception(std::string const&, std::string const&)' follow
makePages/makePages.o:(.rodata._ZTVN9makePages12detailClientE[_ZTVN9makePages12detailClientE]+0x290): undefined reference to `Wt::WWidget::isExposed(Wt::WWidget*)'
makePages/makePages.o:(.rodata._ZTVN9makePages9newClientE[_ZTVN9makePages9newClientE]+0x290): undefined reference to `Wt::WWidget::isExposed(Wt::WWidget*)'
collect2: error: ld returned 1 exit status
make: *** [familyworks] Error 1

I un-installed everything and made a clean install from the repository again and I still got these errors so I am now running boost 1.49 from the repository and wt3.2.3 compiled from source. I'm at a loss as to where these errors come from (it does not look like my code is at fault - hopefully) as I have not changed my code. Maybe the repository version has changed?

Any help would be hugely appreciated because I was just starting to get the hang of Wt and make some interesting apps.

Thanks in advance.


Replies (2)

RE: Undefined references after Wt upgrade - Added by Koen Deforche about 12 years ago

Hey Jeremy,

It seems you still have a mismatch between Wt header files and Wt libraries: it looks like you have new versions of header files but old versions of the libraries (Wt::Dbo::Exception() changed signature on Jul. 9, which is between 3.2.1 and 3.2.2 releases), and a similar thing goes or WWidget::isExposed().

Regards,

koen

RE: Undefined references after Wt upgrade - Added by Jeremy Minton about 12 years ago

Thanks Koen,

The repository installed to /usr/include and the build from source installed to /usr/local/include and the former was being found first. That's replaced and fixed now and I'm back into it.

Thanks again,

    (1-2/2)