Kirjoittaja Aihe: KDE ohjelman kääntäminen QDevelopilla  (Luettu 1519 kertaa)

mikaeli

  • Käyttäjä
  • Viestejä: 16
    • Profiili
KDE ohjelman kääntäminen QDevelopilla
« : 27.10.08 - klo:23.52 »
Olen aloittelemassa KDE-ohjelmointia ja koska olen jo harrastellut jotain QT4:n kanssa haluaisin käyttää QDeveloperia myös KDE ohjelmien tekoon. Ongelmani on, että en saa edes perus HelloWorldiä kääntymään Qdeveloperilla. Jos teen homman ilman ideä (kate -> cmake -> make) niin ohjelma kääntyy hyvin ja on ajettavissa. Jos taas koitan kääntää ohjelman QDevelorilla niin saan seuraanlaisen virheilmoituksen:
Koodia: [Valitse]
Build (make)...
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -o main.o main.cpp
main.cpp:1:24: error: KApplication: No such file or directory
main.cpp:2:22: error: KAboutData: No such file or directory
main.cpp:3:24: error: KCmdLineArgs: No such file or directory
main.cpp:4:23: error: KMessageBox: No such file or directory
main.cpp: In function ‘int main(int, char**)’:
main.cpp:8: error: ‘KAboutData’ was not declared in this scope
main.cpp:8: error: expected `;' before ‘aboutData’
main.cpp:32: error: ‘KCmdLineArgs’ has not been declared
main.cpp:32: error: ‘aboutData’ was not declared in this scope
main.cpp:33: error: ‘KApplication’ was not declared in this scope
main.cpp:33: error: expected `;' before ‘app’
main.cpp:34: error: ‘KGuiItem’ was not declared in this scope
main.cpp:34: error: expected `;' before ‘yesButton’
main.cpp:37: error: ‘KMessageBox’ has not been declared
main.cpp:37: error: ‘i18n’ was not declared in this scope
main.cpp:38: error: ‘yesButton’ was not declared in this scope
make: *** [main.o] Error 1
---------------------- Build finished with 15 error(s) ----------------------

Kysymys kuuluukin, mitä asetusta QDeveloperissa pitäisi muuttaa, että se löytää KDE4 kirjastot?

teprrr

  • Käyttäjä
  • Viestejä: 304
    • Profiili
Vs: KDE ohjelman kääntäminen QDevelopilla
« Vastaus #1 : 16.12.08 - klo:11.02 »
Jos tarkoitat QDevelopilla QtCreatoria, niin se ei valitettavasti tue CMakea eikä siten osaa automaattisesti hoitaa hakupolkuja kuntoon. Mahtaisiko käännösasetuksista löytyä sisällytettävien hakemistojen ja kirjastojen kentät? Jos ei, niin voit suoraan muokata projektin hakemistosta löytyvää .pro-tiedostoa ja lisätä sinne polun, josta nuo tiedostot löytyvät.

Esimerkiksi seuraavanlaiset rivit (missä tietysti tuo polku on korjattu oikeaksi..) .pro-tiedostoon saattavat auttaa.
Koodia: [Valitse]
INCLUDEPATH += /usr/include/kde4/
LIBS += -lkdecore -lkdeui