[RISOLTO] Problemi con l'installazione

Per coloro che sono all'inizio con Qt e la programmazione in generale.

[RISOLTO] Problemi con l'installazione

Messaggioda Milluz » 29 lug , 2010 5:20 pm

Salve a tutti, sono nuovissimo di questo forum, delle QT e a dirla tutta anche di linux.

Mi trovo a dover sviluppare un progetto con queste librerie e le QWT, così ho provato ad installare il tutto su Kubuntu 10.04.
Ecco cosa ho fatto:

- Ho scaricato dal sito ufficiale il pacchetto completo comprendente QT Creator 2.0.0 e le librerie 4.6.2 e installato seguendo l'installazione guidata stile windows.
- Ho scaricato le qwt-5.2.1 e per installare ho seguito questi passi:
qmake qwt.pro -o Makefile
make
make install

Provo a compilare uno degli esempi delle QWT e mi dice che non trova la libreria libqwt.so.5
Così provo a fargliela prendere utilizzando il comando
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/max/qwt-5.1.2/lib/


Risultato della compilazione?
Ecco:
Codice: Seleziona tutto
Running build steps for project bode...
Configuration unchanged, skipping qmake step.
Starting: "/usr/bin/make" -w
make: ingresso nella directory «/home/max/Documenti/qwt-5.2.1/examples/bode-build-desktop»
/usr/bin/qmake-qt4 -spec /usr/share/qt4/mkspecs/linux-g++ -unix CONFIG+=debug -o Makefile ../bode/bode.pro
make: uscita dalla directory «/home/max/Documenti/qwt-5.2.1/examples/bode-build-desktop»
make: ingresso nella directory «/home/max/Documenti/qwt-5.2.1/examples/bode-build-desktop»
g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I../bode -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I../bode -I. -I. -o bode.o ../bode/bode.cpp
../bode/bode.cpp:23:25: error: qwt_counter.h: Nessun file o directory
../bode/bode.cpp:24:29: error: qwt_plot_zoomer.h: Nessun file o directory
../bode/bode.cpp:25:29: error: qwt_plot_panner.h: Nessun file o directory
../bode/bode.cpp:26:22: error: qwt_text.h: Nessun file o directory
../bode/bode.cpp:27:22: error: qwt_math.h: Nessun file o directory
In file included from ../bode/bode.cpp:29:
../bode/bode_plot.h:1:22: error: qwt_plot.h: Nessun file o directory
In file included from ../bode/bode.cpp:30:
../bode/bode.h:2:25: error: qwt_polygon.h: Nessun file o directory
In file included from ../bode/bode.cpp:29:
../bode/bode_plot.h:7: error: expected class-name before ‘{’ token
In file included from ../bode/bode.cpp:30:
../bode/bode.h:18: error: ISO C++ forbids declaration of ‘QwtPolygon’ with no type
../bode/bode.h:18: error: expected ‘,’ or ‘...’ before ‘&’ token
../bode/bode.cpp:33: error: invalid use of incomplete type ‘struct QwtPlotZoomer’
../bode/bode.h:4: error: forward declaration of ‘struct QwtPlotZoomer’
../bode/bode.cpp:35: error: ‘QwtPlotCanvas’ has not been declared
../bode/bode.cpp: In constructor ‘Zoomer::Zoomer(int, int, int*)’:
../bode/bode.cpp:36: error: type ‘QwtPlotZoomer’ is not a direct base of ‘Zoomer’
../bode/bode.cpp:38: error: ‘QwtPicker’ has not been declared
../bode/bode.cpp:38: error: ‘QwtPicker’ has not been declared
../bode/bode.cpp:38: error: ‘setSelectionFlags’ was not declared in this scope
../bode/bode.cpp:39: error: ‘QwtPicker’ has not been declared
../bode/bode.cpp:39: error: ‘setTrackerMode’ was not declared in this scope
../bode/bode.cpp:40: error: ‘QwtPicker’ has not been declared
../bode/bode.cpp:40: error: ‘setRubberBand’ was not declared in this scope
../bode/bode.cpp:49: error: ‘QwtEventPattern’ has not been declared
../bode/bode.cpp:50: error: ‘setMousePattern’ was not declared in this scope
../bode/bode.cpp:52: error: ‘QwtEventPattern’ has not been declared
../bode/bode.cpp: In constructor ‘MainWin::MainWin(QWidget*)’:
../bode/bode.cpp:71: error: ‘class BodePlot’ has no member named ‘setMargin’
../bode/bode.cpp:77: error: ‘QwtPlot’ has not been declared
../bode/bode.cpp:77: error: ‘QwtPlot’ has not been declared
../bode/bode.cpp:78: error: ‘class BodePlot’ has no member named ‘canvas’
../bode/bode.cpp:79: error: invalid use of incomplete type ‘struct QwtPlotZoomer’
../bode/bode.h:4: error: forward declaration of ‘struct QwtPlotZoomer’
../bode/bode.cpp:79: error: ‘QwtPicker’ has not been declared
../bode/bode.cpp:80: error: invalid use of incomplete type ‘struct QwtPlotZoomer’
../bode/bode.h:4: error: forward declaration of ‘struct QwtPlotZoomer’
../bode/bode.cpp:81: error: invalid use of incomplete type ‘struct QwtPlotZoomer’
../bode/bode.h:4: error: forward declaration of ‘struct QwtPlotZoomer’
../bode/bode.cpp:81: error: ‘QwtPicker’ has not been declared
../bode/bode.cpp:82: error: invalid use of incomplete type ‘struct QwtPlotZoomer’
../bode/bode.h:4: error: forward declaration of ‘struct QwtPlotZoomer’
../bode/bode.cpp:84: error: ‘QwtPlot’ has not been declared
../bode/bode.cpp:84: error: ‘QwtPlot’ has not been declared
../bode/bode.cpp:85: error: ‘class BodePlot’ has no member named ‘canvas’
../bode/bode.cpp:87: error: ‘class BodePlot’ has no member named ‘canvas’
../bode/bode.cpp:87: error: invalid use of incomplete type ‘struct QwtPlotPanner’
../bode/bode.h:6: error: forward declaration of ‘struct QwtPlotPanner’
../bode/bode.cpp:88: error: invalid use of incomplete type ‘struct QwtPlotPanner’
../bode/bode.h:6: error: forward declaration of ‘struct QwtPlotPanner’
../bode/bode.cpp:90: error: ‘QwtPlot’ has not been declared
../bode/bode.cpp:90: error: ‘QwtPlot’ has not been declared
../bode/bode.cpp:91: error: ‘QwtPicker’ has not been declared
../bode/bode.cpp:91: error: ‘QwtPicker’ has not been declared
../bode/bode.cpp:92: error: incomplete type ‘QwtPlotPicker’ used in nested name specifier
../bode/bode.cpp:92: error: ‘QwtPicker’ has not been declared
../bode/bode.cpp:93: error: ‘class BodePlot’ has no member named ‘canvas’
../bode/bode.cpp:93: error: invalid use of incomplete type ‘struct QwtPlotPicker’
../bode/bode.h:5: error: forward declaration of ‘struct QwtPlotPicker’
../bode/bode.cpp:94: error: invalid use of incomplete type ‘struct QwtPlotPicker’
../bode/bode.h:5: error: forward declaration of ‘struct QwtPlotPicker’
../bode/bode.cpp:95: error: invalid use of incomplete type ‘struct QwtPlotPicker’
../bode/bode.h:5: error: forward declaration of ‘struct QwtPlotPicker’
../bode/bode.cpp:95: error: ‘QwtPicker’ has not been declared
../bode/bode.cpp:96: error: invalid use of incomplete type ‘struct QwtPlotPicker’
../bode/bode.h:5: error: forward declaration of ‘struct QwtPlotPicker’
../bode/bode.cpp:98: error: no matching function for call to ‘MainWin::setCentralWidget(BodePlot*&)’
/usr/include/qt4/QtGui/qmainwindow.h:141: note: candidates are: void QMainWindow::setCentralWidget(QWidget*)
../bode/bode.cpp:159: error: ‘QwtCounter’ was not declared in this scope
../bode/bode.cpp:159: error: ‘cntDamp’ was not declared in this scope
../bode/bode.cpp:159: error: expected type-specifier before ‘QwtCounter’
../bode/bode.cpp:159: error: expected ‘;’ before ‘QwtCounter’
../bode/bode.cpp:193: error: no matching function for call to ‘MainWin::connect(QwtPlotPicker*&, const char*, const char*)’
/usr/include/qt4/QtCore/qobject.h:198: note: candidates are: static bool QObject::connect(const QObject*, const char*, const QObject*, const char*, Qt::ConnectionType)
/usr/include/qt4/QtCore/qobject.h:313: note: bool QObject::connect(const QObject*, const char*, const char*, Qt::ConnectionType) const
../bode/bode.cpp:195: error: no matching function for call to ‘MainWin::connect(QwtPlotPicker*&, const char*, const char*)’
/usr/include/qt4/QtCore/qobject.h:198: note: candidates are: static bool QObject::connect(const QObject*, const char*, const QObject*, const char*, Qt::ConnectionType)
/usr/include/qt4/QtCore/qobject.h:313: note: bool QObject::connect(const QObject*, const char*, const char*, Qt::ConnectionType) const
../bode/bode.cpp: In member function ‘void MainWin::print()’:
../bode/bode.cpp:213: error: ‘class BodePlot’ has no member named ‘title’
../bode/bode.cpp:231: error: ‘QwtPlotPrintFilter’ was not declared in this scope
../bode/bode.cpp:231: error: expected ‘;’ before ‘filter’
../bode/bode.cpp:234: error: ‘QwtPlotPrintFilter’ is not a class or namespace
../bode/bode.cpp:235: error: ‘QwtPlotPrintFilter’ is not a class or namespace
../bode/bode.cpp:236: error: ‘QwtPlotPrintFilter’ is not a class or namespace
../bode/bode.cpp:237: error: ‘filter’ was not declared in this scope
../bode/bode.cpp:239: error: ‘class BodePlot’ has no member named ‘print’
../bode/bode.cpp:239: error: ‘filter’ was not declared in this scope
../bode/bode.cpp: In member function ‘void MainWin::enableZoomMode(bool)’:
../bode/bode.cpp:289: error: invalid use of incomplete type ‘struct QwtPlotPanner’
../bode/bode.h:6: error: forward declaration of ‘struct QwtPlotPanner’
../bode/bode.cpp:291: error: invalid use of incomplete type ‘struct QwtPlotZoomer’
../bode/bode.h:4: error: forward declaration of ‘struct QwtPlotZoomer’
../bode/bode.cpp:292: error: invalid use of incomplete type ‘struct QwtPlotZoomer’
../bode/bode.h:4: error: forward declaration of ‘struct QwtPlotZoomer’
../bode/bode.cpp:294: error: invalid use of incomplete type ‘struct QwtPlotZoomer’
../bode/bode.h:4: error: forward declaration of ‘struct QwtPlotZoomer’
../bode/bode.cpp:295: error: invalid use of incomplete type ‘struct QwtPlotZoomer’
../bode/bode.h:4: error: forward declaration of ‘struct QwtPlotZoomer’
../bode/bode.cpp:297: error: invalid use of incomplete type ‘struct QwtPlotPicker’
../bode/bode.h:5: error: forward declaration of ‘struct QwtPlotPicker’
../bode/bode.cpp: In member function ‘void MainWin::showInfo(QString)’:
../bode/bode.cpp:306: error: invalid use of incomplete type ‘struct QwtPlotPicker’
../bode/bode.h:5: error: forward declaration of ‘struct QwtPlotPicker’
../bode/bode.cpp: In member function ‘void MainWin::moved(const QPoint&)’:
../bode/bode.cpp:325: error: ‘class BodePlot’ has no member named ‘invTransform’
../bode/bode.cpp:325: error: ‘QwtPlot’ has not been declared
../bode/bode.cpp:326: error: ‘class BodePlot’ has no member named ‘invTransform’
../bode/bode.cpp:326: error: ‘QwtPlot’ has not been declared
../bode/bode.cpp:327: error: ‘class BodePlot’ has no member named ‘invTransform’
../bode/bode.cpp:327: error: ‘QwtPlot’ has not been declared
../bode/bode.cpp: At global scope:
../bode/bode.cpp:332: error: ISO C++ forbids declaration of ‘QwtPolygon’ with no type
../bode/bode.cpp:332: error: expected ‘,’ or ‘...’ before ‘&’ token
../bode/bode.cpp:332: warning: unused parameter ‘QwtPolygon’
make: uscita dalla directory «/home/max/Documenti/qwt-5.2.1/examples/bode-build-desktop»
make: *** [bode.o] Errore 1
The process "/usr/bin/make" exited with code %2.
Error while building project bode (target: Desktop)
When executing build step 'Make'


Qualcuno sa dirmi cosa ho sbagliato? Grazie a tutti :)
Ultima modifica di Milluz il 29 lug , 2010 9:21 pm, modificato 1 volta in totale.
Milluz
Leggo soltanto
 
Messaggi: 2
Iscritto il: 23 lug , 2010 10:34 am
Programmo in: C++, Java

Re: Problemi con l'installazione

Messaggioda TrueNeo » 29 lug , 2010 8:46 pm

Scusa ma Kubuntu dovrebbe avere i pacchetti già printi per sviluppare in Qt4. Magari non avranno il Creator 2.0 ma per fare ciò che ti serve mi sembra siano più che idonei. Ho fatto una veloce ricerca e ci sono pacchetti dev delle QWT già pronti per l'installazione.
I tuoi errori sembrano derivanti dal fatto che il compilatore non riesce a trovare i file header, dovresti dirgli dove cercarli. Secondo me se installi i pacchetti preimpostati non dovresti avere più problemi.

Daniele

Avatar utente
TrueNeo
Admin
 
Messaggi: 201
Iscritto il: 29 dic , 2009 7:42 pm
Località: Bari
Programmo in: C++

Re: Problemi con l'installazione

Messaggioda Milluz » 29 lug , 2010 9:07 pm

Risolto, grazie :)

Ho semplicemente fatto un
sudo cp -v libqwt* /usr/lib

Dalla cartella delle qwt, inoltre ho inserito nel file *.pro la stringa
INCLUDEPATH += /home/max/Documenti/qwt-5.2.1/src



Grazie mille :)
Milluz
Leggo soltanto
 
Messaggi: 2
Iscritto il: 23 lug , 2010 10:34 am
Programmo in: C++, Java


Torna a Principianti

Chi c’è in linea

Visitano il forum: Nessuno e 1 ospite

cron