Como configurar o KDevelop para compilar Wt?

1. Como configurar o KDevelop para compilar Wt?

Wilker Azevedo
cytron

(usa Slackware)

Enviado em 09/08/2015 - 14:58h

Então gente!

Estou deselvolvendo em Wt (Witty: http://www.webtoolkit.eu/wt), porém utilizo o KDevelop para escrever. O problema é que sempre tenho que compilar usando o terminal, pois para compilar usando a lib Wt, tenho que fazer assim:

g++ -L/usr/lib -lwt -lwthttp <código-cpp> -o executável.wt

Agora instalei um templante para Wt no KDevelop. Até que vai bem na hora de criar um novo projeto, o diretório é criado, os arquivos cmake tudo gerado. Mas... Na hora de compilar dá erro, "undefined reference", ou seja, as libs não são configuradas pelo template (imagino).

Procurei no KDevelop algum lugar para configurar a compilação e não encontrei.

Alguem aí sabe como resolver?


  


2. Re: Como configurar o KDevelop para compilar Wt?

Wilker Azevedo
cytron

(usa Slackware)

Enviado em 10/08/2015 - 00:41h

Bom, fui no diretório do projeto e rodei o make, deu o mesmo erro. Lembrando que o projeto foi gerado pelo template. Quando é um projeto feito na mão, funciona. Ou seja, parece que o templante tem algo de errado. Não manjo nada desses arquivos do make / cmake, se alguém puder ajudar na questão...

O templante é do Wt, tem no próprio KDevelop, mas é preciso ir na opção de adicionar novo template para baixar. Caso facilite, coloco aqui o trecho que está relacionado ao problema, basta me pedir o trecho do arquivo específico, pois não faço idéia do que é e onde está hehe.

O erro é este:

/usr/bin/cmake -H/home/cytron/projects/viaDigitalNet -B/home/cytron/projects/viaDigitalNet/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/cytron/projects/viaDigitalNet/build/CMakeFiles /home/cytron/projects/viaDigitalNet/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory `/home/cytron/projects/viaDigitalNet/build'
make -f src/CMakeFiles/viaDigitalNetLib.dir/build.make src/CMakeFiles/viaDigitalNetLib.dir/depend
make[2]: Entering directory `/home/cytron/projects/viaDigitalNet/build'
cd /home/cytron/projects/viaDigitalNet/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/cytron/projects/viaDigitalNet /home/cytron/projects/viaDigitalNet/src /home/cytron/projects/viaDigitalNet/build /home/cytron/projects/viaDigitalNet/build/src /home/cytron/projects/viaDigitalNet/build/src/CMakeFiles/viaDigitalNetLib.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/cytron/projects/viaDigitalNet/build'
make -f src/CMakeFiles/viaDigitalNetLib.dir/build.make src/CMakeFiles/viaDigitalNetLib.dir/build
make[2]: Entering directory `/home/cytron/projects/viaDigitalNet/build'
make[2]: Nothing to be done for `src/CMakeFiles/viaDigitalNetLib.dir/build'.
make[2]: Leaving directory `/home/cytron/projects/viaDigitalNet/build'
/usr/bin/cmake -E cmake_progress_report /home/cytron/projects/viaDigitalNet/build/CMakeFiles 2
[ 50%] Built target viaDigitalNetLib
make -f CMakeFiles/viaDigitalNet.dir/build.make CMakeFiles/viaDigitalNet.dir/depend
make[2]: Entering directory `/home/cytron/projects/viaDigitalNet/build'
cd /home/cytron/projects/viaDigitalNet/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/cytron/projects/viaDigitalNet /home/cytron/projects/viaDigitalNet /home/cytron/projects/viaDigitalNet/build /home/cytron/projects/viaDigitalNet/build /home/cytron/projects/viaDigitalNet/build/CMakeFiles/viaDigitalNet.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/cytron/projects/viaDigitalNet/build'
make -f CMakeFiles/viaDigitalNet.dir/build.make CMakeFiles/viaDigitalNet.dir/build
make[2]: Entering directory `/home/cytron/projects/viaDigitalNet/build'
Linking CXX executable viaDigitalNet
/usr/bin/cmake -E cmake_link_script CMakeFiles/viaDigitalNet.dir/link.txt --verbose=1
/usr/bin/c++ -g CMakeFiles/viaDigitalNet.dir/main.cpp.o -o viaDigitalNet -rdynamic src/libviaDigitalNetLib.a /usr/local/lib/libwtdbo.so /usr/local/lib/libwtdbosqlite3.so -lboost_date_time -lboost_regex -lboost_program_options -lboost_signals -lboost_system -lboost_filesystem -lboost_thread -Wl,-rpath,/usr/local/lib
CMakeFiles/viaDigitalNet.dir/main.cpp.o: In function `main':
/home/cytron/projects/viaDigitalNet/main.cpp:65: undefined reference to `Wt::WServer::WServer(std::string const&, std::string const&)'
/home/cytron/projects/viaDigitalNet/main.cpp:66: undefined reference to `Wt::WServer::setServerConfiguration(int, char**, std::string const&)'
/home/cytron/projects/viaDigitalNet/main.cpp:67: undefined reference to `Wt::WServer::addEntryPoint(Wt::EntryPointType, boost::function<Wt::WApplication* (Wt::WEnvironment const&)>, std::string const&, std::string const&)'
/home/cytron/projects/viaDigitalNet/main.cpp:69: undefined reference to `Wt::WServer::start()'
/home/cytron/projects/viaDigitalNet/main.cpp:70: undefined reference to `Wt::WServer::waitForShutdown(char const*)'
/home/cytron/projects/viaDigitalNet/main.cpp:73: undefined reference to `Wt::WServer::stop()'
/home/cytron/projects/viaDigitalNet/main.cpp:77: undefined reference to `Wt::WServer::~WServer()'
/home/cytron/projects/viaDigitalNet/main.cpp:78: undefined reference to `Wt::WServer::~WServer()'
/home/cytron/projects/viaDigitalNet/main.cpp:78: undefined reference to `Wt::WServer::~WServer()'
/home/cytron/projects/viaDigitalNet/main.cpp:77: undefined reference to `Wt::WServer::~WServer()'
src/libviaDigitalNetLib.a(viaDigitalNetApp.cpp.o): In function `viaDigitalNetApp::viaDigitalNetApp(Wt::WEnvironment const&)':
/home/cytron/projects/viaDigitalNet/src/viaDigitalNetApp.cpp:34: undefined reference to `Wt::WApplication::WApplication(Wt::WEnvironment const&, Wt::WtLibVersion)'
/home/cytron/projects/viaDigitalNet/src/viaDigitalNetApp.cpp:36: undefined reference to `Wt::WString::WString(char const*, Wt::CharEncoding)'
/home/cytron/projects/viaDigitalNet/src/viaDigitalNetApp.cpp:36: undefined reference to `Wt::WApplication::setTitle(Wt::WString const&)'
/home/cytron/projects/viaDigitalNet/src/viaDigitalNetApp.cpp:36: undefined reference to `Wt::WString::~WString()'
/home/cytron/projects/viaDigitalNet/src/viaDigitalNetApp.cpp:37: undefined reference to `Wt::WApplication::enableUpdates(bool)'
/home/cytron/projects/viaDigitalNet/src/viaDigitalNetApp.cpp:38: undefined reference to `Wt::WString::WString(std::string const&, Wt::CharEncoding)'
/home/cytron/projects/viaDigitalNet/src/viaDigitalNetApp.cpp:39: undefined reference to `Wt::WApplication::log(std::string const&) const'
/home/cytron/projects/viaDigitalNet/src/viaDigitalNetApp.cpp:39: undefined reference to `Wt::WLogEntry::operator<<(char const*)'
/home/cytron/projects/viaDigitalNet/src/viaDigitalNetApp.cpp:39: undefined reference to `Wt::WLogEntry::operator<<(Wt::WString const&)'
/home/cytron/projects/viaDigitalNet/src/viaDigitalNetApp.cpp:39: undefined reference to `Wt::WLogEntry::~WLogEntry()'
/home/cytron/projects/viaDigitalNet/src/viaDigitalNetApp.cpp:41: undefined reference to `Wt::WString::narrow(std::locale const&) const'
/home/cytron/projects/viaDigitalNet/src/viaDigitalNetApp.cpp:45: undefined reference to `Wt::WBoxLayout::WBoxLayout(Wt::WBoxLayout::Direction, Wt::WWidget*)'
/home/cytron/projects/viaDigitalNet/src/viaDigitalNetApp.cpp:46: undefined reference to `Wt::WLayout::setContentsMargins(int, int, int, int)'
/home/cytron/projects/viaDigitalNet/src/viaDigitalNetApp.cpp:47: undefined reference to `Wt::WString::WString(char const*, Wt::CharEncoding)'
/home/cytron/projects/viaDigitalNet/src/viaDigitalNetApp.cpp:47: undefined reference to `Wt::WText::WText(Wt::WString const&, Wt::WContainerWidget*)'
/home/cytron/projects/viaDigitalNet/src/viaDigitalNetApp.cpp:47: undefined reference to `Wt::WBoxLayout::addWidget(Wt::WWidget*, int, Wt::WFlags<Wt::AlignmentFlag>)'
/home/cytron/projects/viaDigitalNet/src/viaDigitalNetApp.cpp:47: undefined reference to `Wt::WString::~WString()'
/home/cytron/projects/viaDigitalNet/src/viaDigitalNetApp.cpp:49: undefined reference to `Wt::WApplication::setCssTheme(std::string const&)'
/home/cytron/projects/viaDigitalNet/src/viaDigitalNetApp.cpp:49: undefined reference to `Wt::WString::~WString()'
/home/cytron/projects/viaDigitalNet/src/viaDigitalNetApp.cpp:36: undefined reference to `Wt::WString::~WString()'
/home/cytron/projects/viaDigitalNet/src/viaDigitalNetApp.cpp:39: undefined reference to `Wt::WLogEntry::~WLogEntry()'
/home/cytron/projects/viaDigitalNet/src/viaDigitalNetApp.cpp:47: undefined reference to `Wt::WString::~WString()'
/home/cytron/projects/viaDigitalNet/src/viaDigitalNetApp.cpp:49: undefined reference to `Wt::WString::~WString()'
/home/cytron/projects/viaDigitalNet/src/viaDigitalNetApp.cpp:34: undefined reference to `Wt::WApplication::~WApplication()'
src/libviaDigitalNetLib.a(viaDigitalNetApp.cpp.o):(.rodata._ZTV16viaDigitalNetApp[_ZTV16viaDigitalNetApp]+0x20): undefined reference to `Wt::WObject::id() const'
src/libviaDigitalNetLib.a(viaDigitalNetApp.cpp.o):(.rodata._ZTV16viaDigitalNetApp[_ZTV16viaDigitalNetApp]+0x28): undefined reference to `Wt::WObject::setObjectName(std::string const&)'
src/libviaDigitalNetLib.a(viaDigitalNetApp.cpp.o):(.rodata._ZTV16viaDigitalNetApp[_ZTV16viaDigitalNetApp]+0x30): undefined reference to `Wt::WObject::objectName() const'
src/libviaDigitalNetLib.a(viaDigitalNetApp.cpp.o):(.rodata._ZTV16viaDigitalNetApp[_ZTV16viaDigitalNetApp]+0x38): undefined reference to `Wt::WObject::removeChild(Wt::WObject*)'
src/libviaDigitalNetLib.a(viaDigitalNetApp.cpp.o):(.rodata._ZTV16viaDigitalNetApp[_ZTV16viaDigitalNetApp]+0x40): undefined reference to `Wt::WObject::hasParent() const'
src/libviaDigitalNetLib.a(viaDigitalNetApp.cpp.o):(.rodata._ZTV16viaDigitalNetApp[_ZTV16viaDigitalNetApp]+0x48): undefined reference to `Wt::WObject::signalConnectionsChanged()'
src/libviaDigitalNetLib.a(viaDigitalNetApp.cpp.o):(.rodata._ZTV16viaDigitalNetApp[_ZTV16viaDigitalNetApp]+0x50): undefined reference to `Wt::WObject::setParent(Wt::WObject*)'
src/libviaDigitalNetLib.a(viaDigitalNetApp.cpp.o):(.rodata._ZTV16viaDigitalNetApp[_ZTV16viaDigitalNetApp]+0x58): undefined reference to `Wt::WObject::setFormData(Wt::WObject::FormData const&)'
src/libviaDigitalNetLib.a(viaDigitalNetApp.cpp.o):(.rodata._ZTV16viaDigitalNetApp[_ZTV16viaDigitalNetApp]+0x60): undefined reference to `Wt::WObject::setRequestTooLarge(long)'
src/libviaDigitalNetLib.a(viaDigitalNetApp.cpp.o):(.rodata._ZTV16viaDigitalNetApp[_ZTV16viaDigitalNetApp]+0x68): undefined reference to `Wt::WObject::getStateless(void (Wt::WObject::*)())'
src/libviaDigitalNetLib.a(viaDigitalNetApp.cpp.o):(.rodata._ZTV16viaDigitalNetApp[_ZTV16viaDigitalNetApp]+0x70): undefined reference to `Wt::WApplication::refresh()'
src/libviaDigitalNetLib.a(viaDigitalNetApp.cpp.o):(.rodata._ZTV16viaDigitalNetApp[_ZTV16viaDigitalNetApp]+0x78): undefined reference to `Wt::WApplication::makeAbsoluteUrl(std::string const&) const'
src/libviaDigitalNetLib.a(viaDigitalNetApp.cpp.o):(.rodata._ZTV16viaDigitalNetApp[_ZTV16viaDigitalNetApp]+0x80): undefined reference to `Wt::WApplication::waitForEvent()'
src/libviaDigitalNetLib.a(viaDigitalNetApp.cpp.o):(.rodata._ZTV16viaDigitalNetApp[_ZTV16viaDigitalNetApp]+0x88): undefined reference to `Wt::WApplication::initialize()'
src/libviaDigitalNetLib.a(viaDigitalNetApp.cpp.o):(.rodata._ZTV16viaDigitalNetApp[_ZTV16viaDigitalNetApp]+0x90): undefined reference to `Wt::WApplication::finalize()'
src/libviaDigitalNetLib.a(viaDigitalNetApp.cpp.o):(.rodata._ZTV16viaDigitalNetApp[_ZTV16viaDigitalNetApp]+0x98): undefined reference to `Wt::WApplication::notify(Wt::WEvent const&)'
src/libviaDigitalNetLib.a(viaDigitalNetApp.cpp.o):(.rodata._ZTV16viaDigitalNetApp[_ZTV16viaDigitalNetApp]+0xa0): undefined reference to `Wt::WApplication::isExposed(Wt::WWidget*) const'
src/libviaDigitalNetLib.a(viaDigitalNetApp.cpp.o):(.rodata._ZTV16viaDigitalNetApp[_ZTV16viaDigitalNetApp]+0xa8): undefined reference to `Wt::WApplication::enableAjax()'
src/libviaDigitalNetLib.a(viaDigitalNetApp.cpp.o):(.rodata._ZTV16viaDigitalNetApp[_ZTV16viaDigitalNetApp]+0xb0): undefined reference to `Wt::WApplication::unload()'
src/libviaDigitalNetLib.a(viaDigitalNetApp.cpp.o):(.rodata._ZTV16viaDigitalNetApp[_ZTV16viaDigitalNetApp]+0xb8): undefined reference to `Wt::WApplication::handleJavaScriptError(std::string const&)'
src/libviaDigitalNetLib.a(viaDigitalNetApp.cpp.o): In function `viaDigitalNetApp::~viaDigitalNetApp()':
/home/cytron/projects/viaDigitalNet/src/viaDigitalNetApp.h:25: undefined reference to `Wt::WApplication::~WApplication()'
src/libviaDigitalNetLib.a(viaDigitalNetApp.cpp.o):(.rodata._ZTI16viaDigitalNetApp[_ZTI16viaDigitalNetApp]+0x10): undefined reference to `typeinfo for Wt::WApplication'
collect2: error: ld returned 1 exit status
make[2]: *** [viaDigitalNet] Error 1
make[2]: Leaving directory `/home/cytron/projects/viaDigitalNet/build'
make[1]: *** [CMakeFiles/viaDigitalNet.dir/all] Error 2
make[1]: Leaving directory `/home/cytron/projects/viaDigitalNet/build'
make: *** [all] Error 2







Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts