{"id":1082,"date":"2022-08-30T15:12:05","date_gmt":"2022-08-30T15:12:05","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/09\/problem-about-wt-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:12:05","modified_gmt":"2022-08-30T15:12:05","slug":"problem-about-wt-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/problem-about-wt-collection-of-common-programming-errors\/","title":{"rendered":"problem about wt-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/4758e22c1321eeaa3c712b516669a629?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nLarry<br \/>\nwt<br \/>\nI 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 &#8220;C:\/MinGW32\/bin\/mingw32-make.exe&#8221; exited normally. Configuration unchanged, skipping qmake step. Starting: &#8220;C:\/MinGW32\/bin\/mingw32-make.exe&#8221; -w mingw32-make: Entering directory `C:\/Wt\/HelloWt-build-desktop&#8217;C:\/MinGW32\/bin\/mingw32-make -f Makefile.Debugmingw32-make[1]: Entering directory `C:\/Wt\/HelloWt-build-desktop&#8217;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&#8217;..\/..\/Qt\/2010.05\/qt\/include\/QtCore&#8217; -I&#8217;..\/..\/Qt\/2010.05\/qt\/include\/QtNetwork&#8217; -I&#8217;..\/..\/Qt\/2010.05\/qt\/include&#8217; -I&#8217;..\/..\/Wt2\/Include&#8217; -I&#8217;..\/..\/boost\/include\/boost-1_45&#8242; -I&#8217;..\/..\/Qt\/2010.05\/qt\/include\/ActiveQt&#8217; -I&#8217;debug&#8217; -I&#8217;..\/..\/WtTest\/HelloWt&#8217; -I&#8217;.&#8217; -I&#8217;..\/..\/Qt\/2010.05\/qt\/mkspecs\/win32-g++&#8217; -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&#8217;c:\/Qt\/2010.05\/qt\/lib&#8217; 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<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e88fe028429210e6884fcfe782d4f703?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nkikeenrique<br \/>\nc++ cmake linker-error wt<br \/>\nI 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()&#8217;: \/home\/s\/Downloads\/wt-3.2.3\/examples\/hangman\/Session.C:101: undefined reference to `void Wt::Dbo::Session::mapClass(char const*)&#8217; ..\/hangman\/CMakeFiles\/hangman.wt.dir\/Session.o: In function `Wt::Auth::Dbo::AuthInfo::user() const&#8217;: \/home\/s\/Downloads\/wt-3.2.3\/src\/Wt\/Auth\/Dbo\/AuthInfo:94: undefined reference to `Wt::Dbo::ptr::ptr(Wt::Dbo::ptr const&amp;)&#8217; ..\/hangman\/CMakeFiles\/hangman.wt.dir\/Session.o: In function `Session::user() const&#8217;: \/home\/s\/Downloads\/wt-3.2.3\/examples\/hangman\/Session.C:138: undefined reference to `Wt::Dbo::ptr::operator bool() const&#8217; \/home\/s\/Downloads\/wt-3.2.3\/examples\/hangman\/Session.C:139: undefined reference to `Use<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/da04c00ca0145075798cc4fb4e8f9635?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nOndrej Fabry<br \/>\nc++ qt cmake qmake wt<br \/>\nI 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&#8217;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 &#8220;wtwithqt&#8221; example in QtCreator(qmake). I&#8217;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&#8230; 13:28:15: Starting: &#8220;\/usr\/bin\/make&#8221; clean -w make: Entering directory `\/home\/nms-development\/QtProject\/testWt-build-desktop-Qt_4_8_1_in_PATH__System__Debug&#8217; \/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<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/87442e505919f0d53d06593d5617d5b7?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nkirill_igum<br \/>\nwt<br \/>\n&gt;g++ -o hangman hangman.C -lwthttp -lwt -lboost_signals \/tmp\/cc5puOIR.o: In function `createApplication(Wt::WEnvironment const&amp;)&#8217;: hangman.C:(.text+0x19b): undefined reference to `HangmanGame::HangmanGame(Wt::WContainerWidget*)&#8217; \/tmp\/cc5puOIR.o: In function `main&#8217;: hangman.C:(.text+0x3dc): undefined reference to `Session::configureAuth()&#8217; collect2: ld returned 1 exit statusI also tried this:&gt;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<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/3cb49f69d4ca75359a9b517408faaa54?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser52875<br \/>\nc++ wt<br \/>\nI&#8217;m asking the question after reading this article http:\/\/stevehanov.ca\/blog\/index.php?id=95Al<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/02304b1bea41f5619a40fb95a2ce1d8c?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nkrizajB<br \/>\nqt wt<br \/>\nI 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&#8217;t compile, getting undefi<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/cb1ef610ce36320c8991c257d7c85d00?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser1876508<br \/>\nc++ compilation compiler-errors wt<br \/>\nI 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 &#8216;_ZN5boost7signals6detail16signal_base_impl12connect_slotERKNS_3anyERKNS1_12stored_groupENS_10shared_ptrINS1_9slot_base6data_tEEENS0_16connect_positionE&#8217; \/usr\/bin\/ld: note: &#8216;_ZN5boost7signals6detail16signal_base_impl12connect_slotERKNS_3anyERKNS1_12stored_groupENS_10shared_ptrINS1_9slot_base6data_tEEENS0_16connect_positionE&#8217; 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&amp; env);private:Wt::WLineEdit *nameEdit_;Wt::WText *greeting_;void greet(); };HelloApplication::HelloApplication(const Wt::WEnvironment&amp; env) : Wt::WApplication(env) {setTitle(&#8220;Hello world&#8221;);root()-&gt;addWidget(new Wt::WText(&#8220;What is your name? &#8220;));nameEdit_ = new Wt::WLineEdit(root());Wt::WPushButton *button = new Wt::WPushButton(&#8220;Greet me.&#8221;, root());root()-&gt;addWidget(new Wt::WBreak());greeting_ = new Wt::WText(root());button-&gt;clicked().connect(this, &amp;HelloApplication::greet); }void HelloApplication::greet() {greeting_-&gt;setText(&#8220;Hello there, &#8221; + nameEdit_-&gt;text()); }Wt::WApplication *createApplication(const Wt::WEnvironment&amp; env) {return new HelloApplication(env); }int<\/li>\n<\/ul>\n<p id=\"rop\"><small>Originally posted 2013-11-09 23:22:04. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>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 &#8220;C:\/MinGW32\/bin\/mingw32-make.exe&#8221; exited normally. Configuration unchanged, skipping qmake step. Starting: &#8220;C:\/MinGW32\/bin\/mingw32-make.exe&#8221; -w mingw32-make: Entering directory `C:\/Wt\/HelloWt-build-desktop&#8217;C:\/MinGW32\/bin\/mingw32-make -f Makefile.Debugmingw32-make[1]: Entering [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1082","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1082","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1082"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1082\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1082"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1082"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1082"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}