# freebsd7.3 qt4 compile error



## xnl96 (Sep 2, 2010)

I tried same simple code 
	
	



```
#include <QApplication>
#include <QPushButton>


 int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);

     QPushButton hello("Hello world!");
     hello.resize(100, 30);

     hello.show();
     return app.exec();
 }
```
But this is my output

```
#qmake -project
#qmake
#make

c++ -c -pipe -Wall -W -O2 -fno-strict-aliasing -pipe -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -I/usr/local/share/qt/mkspecs/freebsd-g++ -I. -I. -I../../../../../local/include -I/include -o main.o main.cpp
main.cpp:1:24: error: QApplication: No such file or directory
main.cpp:2:24: error: QPushButton: No such file or directory
main.cpp:13:3: warning: no newline at end of file
main.cpp: In function 'int main(int, char**)':
main.cpp:6: error: 'QApplication' was not declared in this scope
main.cpp:6: error: expected `;' before 'app'
main.cpp:8: error: 'QPushButton' was not declared in this scope
main.cpp:8: error: expected `;' before 'hello'
main.cpp:9: error: 'hello' was not declared in this scope
main.cpp:12: error: 'app' was not declared in this scope
main.cpp: At global scope:
main.cpp:4: warning: unused parameter 'argc'
main.cpp:4: warning: unused parameter 'argv'
*** Error code 1

Stop in /usr/home/alex/work/c/qt.
```


```
#ls /var/db/pkg | grep qt4
qt4-4.6.3
qt4-accessible-4.6.3
qt4-assistant-4.6.3
qt4-assistant-adp-4.6.3
qt4-clucene-4.6.3
qt4-codecs-cn-4.6.3
qt4-codecs-jp-4.6.3
qt4-codecs-kr-4.6.3
qt4-codecs-tw-4.6.3
qt4-corelib-4.6.3
qt4-dbus-4.6.3
qt4-designer-4.6.3
qt4-doc-4.6.3
qt4-gui-4.6.3
qt4-help-4.6.3
qt4-help-tools-4.6.3
qt4-iconengines-4.6.3
qt4-imageformats-4.6.3
qt4-inputmethods-4.6.3
qt4-l10n-4.6.3
qt4-libQtAssistantClient-4.6.3
qt4-linguist-4.6.3
qt4-makeqpf-4.6.3
qt4-moc-4.6.3
qt4-multimedia-4.6.3
qt4-mysql-plugin-4.6.3
qt4-network-4.6.3
qt4-odbc-plugin-4.6.3
qt4-opengl-4.6.3
qt4-pixeltool-4.6.3
qt4-porting-4.6.3
qt4-psql-plugin-4.6.3
qt4-qdbusviewer-4.6.3
qt4-qdoc3-4.6.3
qt4-qmake-4.6.3
qt4-qt3support-4.6.3_1
qt4-qtconfig-4.6.3
qt4-qtdemo-4.6.3
qt4-qtestlib-4.6.3
qt4-qvfb-4.6.3
qt4-rcc-4.6.3
qt4-script-4.6.3
qt4-scripttools-4.6.3
qt4-sql-4.6.3
qt4-sqlite-plugin-4.6.3
qt4-sqlite2-plugin-4.6.3
qt4-svg-4.6.3
qt4-uic-4.6.3
qt4-uic3-4.6.3
qt4-webkit-4.6.3
qt4-xml-4.6.3
qt4-xmlpatterns-4.6.3
qt4-xmlpatterns-tool-4.6.3
```
what is wrong?


----------



## xnl96 (Sep 2, 2010)

I resolve this whit 

```
#qmake-qt4 -project
#qmake-qt4 
#make
```


----------

