problem about wt-Collection of common programming errors


  • Larry
    wt
    I try to compile a hello world like application using Wt but have problems to link I use Qt creator and mingw32 as compilerwhat am I doing wrong ? Any help will be appreciatedThe process “C:/MinGW32/bin/mingw32-make.exe” exited normally. Configuration unchanged, skipping qmake step. Starting: “C:/MinGW32/bin/mingw32-make.exe” -w mingw32-make: Entering directory `C:/Wt/HelloWt-build-desktop’C:/MinGW32/bin/mingw32-make -f Makefile.Debugmingw32-make[1]: Entering directory `C:/Wt/HelloWt-build-desktop’g++ -c -DNDEBUG -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -D__MINGW32__ -D_WIN32 -DQT_DLL -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I’../../Qt/2010.05/qt/include/QtCore’ -I’../../Qt/2010.05/qt/include/QtNetwork’ -I’../../Qt/2010.05/qt/include’ -I’../../Wt2/Include’ -I’../../boost/include/boost-1_45′ -I’../../Qt/2010.05/qt/include/ActiveQt’ -I’debug’ -I’../../WtTest/HelloWt’ -I’.’ -I’../../Qt/2010.05/qt/mkspecs/win32-g++’ -o debug/main.o ../../WtTest/HelloWt/main.cppg++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-subsystem,console -mthreads -Wl -o debug/HelloWt.exe debug/main.o -L’c:/Qt/2010.05/qt/lib’ C:\Wt2\lib\libwt.a C:\Wt2\lib\libwthttp.a C:\QtSDK\mingw\lib\libws2_32.a C:\QtSDK\mingw\lib\libwsock32.a C:\boost\lib\libboost_thread-mgw45-mt-d-1_45.a C:\boost\lib\libboost_regex-mgw45-mt-d-1_45.a C:\boost\lib\libboost_date_time-mgw45-mt-d-1_45.a C:\boost\lib\libboost_signals-mgw45-mt-d-1_4

  • kikeenrique
    c++ cmake linker-error wt
    I am using C++ webframework for my project. I am trying to add authentication to gitmodel example.I am getting the following errors:../hangman/CMakeFiles/hangman.wt.dir/Session.o: In function `Session::Session()’: /home/s/Downloads/wt-3.2.3/examples/hangman/Session.C:101: undefined reference to `void Wt::Dbo::Session::mapClass(char const*)’ ../hangman/CMakeFiles/hangman.wt.dir/Session.o: In function `Wt::Auth::Dbo::AuthInfo::user() const’: /home/s/Downloads/wt-3.2.3/src/Wt/Auth/Dbo/AuthInfo:94: undefined reference to `Wt::Dbo::ptr::ptr(Wt::Dbo::ptr const&)’ ../hangman/CMakeFiles/hangman.wt.dir/Session.o: In function `Session::user() const’: /home/s/Downloads/wt-3.2.3/examples/hangman/Session.C:138: undefined reference to `Wt::Dbo::ptr::operator bool() const’ /home/s/Downloads/wt-3.2.3/examples/hangman/Session.C:139: undefined reference to `Use

  • Ondrej Fabry
    c++ qt cmake qmake wt
    I am working on a network management application with Qt and I chose to use Wt for UI, because with it I will not have to deal with any of web parts (PHP, AJAX, HTML/CSS) and it’ll be usable on all platforms.I successfully managed to compile and run examples using cmake. Although I am used to QtCreator IDE and qmake I would rather use that for development and compiling. I got stuck trying to compile “wtwithqt” example in QtCreator(qmake). I’ve been searching everywhere for some guide how to compile it with qmake. However I found nothing helpful.Here is my .pro file.testWt.proQT += core QT -= guiTARGET = helloqt CONFIG += console no_keywords CONFIG -=app_bundleTEMPLATE = appINCLUDEPATH += libLIBS += -lwt -lwthttp -lboost_signals -lboost_system -lboost_regexQMAKE_CXXFLAGS += -DNDEBUGHEADERS += \QtObject.h \HelloApplication.hSOURCES += \hello.cpp \QtObject.cppCompile ouput13:28:15: Running build steps for project testWt… 13:28:15: Starting: “/usr/bin/make” clean -w make: Entering directory `/home/nms-development/QtProject/testWt-build-desktop-Qt_4_8_1_in_PATH__System__Debug’ /usr/bin/qmake-qt4 -spec /usr/share/qt4/mkspecs/linux-g++ CONFIG+=debug CONFIG+=declarative_debug -o Makefile ../testWt/testWt.pro make: Leaving directory `/home/nms-develo

  • kirill_igum
    wt
    >g++ -o hangman hangman.C -lwthttp -lwt -lboost_signals /tmp/cc5puOIR.o: In function `createApplication(Wt::WEnvironment const&)’: hangman.C:(.text+0x19b): undefined reference to `HangmanGame::HangmanGame(Wt::WContainerWidget*)’ /tmp/cc5puOIR.o: In function `main’: hangman.C:(.text+0x3dc): undefined reference to `Session::configureAuth()’ collect2: ld returned 1 exit statusI also tried this:>g++ -o hangman hangman.C -I/usr/local/include -L/usr/local/lib -lwthttp -lwt -lboost_random -lboost_regex -lboost_signals -lboost_system -lboost_thread

  • user52875
    c++ wt
    I’m asking the question after reading this article http://stevehanov.ca/blog/index.php?id=95Al

  • krizajB
    qt wt
    I am trying to get Wt working with Qt. I have installed 1.47 boost library, compiled Wt (3.2.1) under Windows using cmake 2.8.8. Tired simple hello world but doesn’t compile, getting undefi

  • user1876508
    c++ compilation compiler-errors wt
    I am beginning to learn how to write Wt applications, but I am receiving a compilation error which I do not understand how to fix. When compiling, I receive an error that says g++ -lwthttp -lwt hello.cpp /usr/bin/ld: /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../libwt.so: undefined reference to symbol ‘_ZN5boost7signals6detail16signal_base_impl12connect_slotERKNS_3anyERKNS1_12stored_groupENS_10shared_ptrINS1_9slot_base6data_tEEENS0_16connect_positionE’ /usr/bin/ld: note: ‘_ZN5boost7signals6detail16signal_base_impl12connect_slotERKNS_3anyERKNS1_12stored_groupENS_10shared_ptrINS1_9slot_base6data_tEEENS0_16connect_positionE’ is defined in DSO /usr/lib/libboost_signals.so.1.52.0 so try adding it to the linker command line /usr/lib/libboost_signals.so.1.52.0: could not read symbols: Invalid operation collect2: error: ld returned 1 exit statusI am running the most recent version of Arch Linux, if that is of any use. Also, here is the application that I want to compile.#include #include #include #include #include #include class HelloApplication : public Wt::WApplication {public:HelloApplication(const Wt::WEnvironment& env);private:Wt::WLineEdit *nameEdit_;Wt::WText *greeting_;void greet(); };HelloApplication::HelloApplication(const Wt::WEnvironment& env) : Wt::WApplication(env) {setTitle(“Hello world”);root()->addWidget(new Wt::WText(“What is your name? “));nameEdit_ = new Wt::WLineEdit(root());Wt::WPushButton *button = new Wt::WPushButton(“Greet me.”, root());root()->addWidget(new Wt::WBreak());greeting_ = new Wt::WText(root());button->clicked().connect(this, &HelloApplication::greet); }void HelloApplication::greet() {greeting_->setText(“Hello there, ” + nameEdit_->text()); }Wt::WApplication *createApplication(const Wt::WEnvironment& env) {return new HelloApplication(env); }int

Originally posted 2013-11-09 23:22:04.