NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

netbeans + qt

 
Post new topic   Reply to topic    NetBeans Forums -> C/C++ Users
View previous topic :: View next topic  
Author Message
Alex Williams
Posted via mailing list.





PostPosted: Thu Oct 15, 2009 11:06 pm    Post subject: netbeans + qt Reply with quote

Hello!
I have Ubuntu 9.10 AMD64 + NetBeans 6.7.1 + Qt SDK with Qt 4.5.2
Qt Creator builds projects correctly.

I used following tutorial:
http://www.netbeans.org/kb/docs/cnd/qt-applications.html
To verify Qt installation I must type "qmake -v". And it shows me 100%
correct version and path. Also I have older Qt 3.3 (to use make
xconfig for Linux kernel).
Then I must manually add Qt include paths in project options... And
then I have compilation OK.
But... linker stage... Linker cannot find any libraries to link... and
can't see QApplication construcro and all others...

I'm using Qt from Qt Creator...
How to setup linker for Qt in NetBeans 6.7.1?

Best regards!
Back to top
Alexey Vladykin
Posted via mailing list.





PostPosted: Fri Oct 16, 2009 9:44 am    Post subject: netbeans + qt Reply with quote

Hi Alex,

Quote:
To verify Qt installation I must type "qmake -v". And it shows me 100%
correct version and path.

It should show version and path corresponding to Qt 4. If it shows Qt 3,
then NetBeans won't work. Make sure that Qt4's /bin directory is before
Qt3's /bin in the PATH.

See this post for a similar problem:
http://forums.netbeans.org/post-41813.html

Alexey
Back to top
Valeriy Soldatov
Posted via mailing list.





PostPosted: Fri Oct 16, 2009 9:58 am    Post subject: netbeans + qt Reply with quote

Alexey
It will not work if user has /usr/bin/qmake link on 3th qmake, because
IDE adds /usr/bin path on build action
Quote:
Hi Alex,


Quote:
To verify Qt installation I must type "qmake -v". And it shows me 100%
correct version and path.


It should show version and path corresponding to Qt 4. If it shows Qt 3,
then NetBeans won't work. Make sure that Qt4's /bin directory is before
Qt3's /bin in the PATH.

See this post for a similar problem:
http://forums.netbeans.org/post-41813.html

Alexey







Back to top
Alexey Vladykin
Posted via mailing list.





PostPosted: Fri Oct 16, 2009 10:31 am    Post subject: netbeans + qt Reply with quote

You are right, it won't work in NetBeans 6.7. But it works in the
current dev builds, because now IDE adds /usr/bin *at the end* of PATH.

Alexey


Valeriy Soldatov wrote:
Quote:
Alexey
It will not work if user has /usr/bin/qmake link on 3th qmake, because
IDE adds /usr/bin path on build action
Quote:
Hi Alex,


Quote:
To verify Qt installation I must type "qmake -v". And it shows me 100%
correct version and path.

It should show version and path corresponding to Qt 4. If it shows Qt 3,
then NetBeans won't work. Make sure that Qt4's /bin directory is before
Qt3's /bin in the PATH.

See this post for a similar problem:
http://forums.netbeans.org/post-41813.html

Alexey
Back to top
tuxxxy



Joined: 24 Oct 2009
Posts: 1

PostPosted: Sat Oct 24, 2009 1:05 am    Post subject: Reply with quote

I just downloaded NetBeans 6.8 beta. It works faster. But...
Still absolute the same problem!

Code:
PATH=/home/s/t/qtsdk-2009.03/qt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games


Code:
s@s-desktop:~$ qmake -v
QMake version 2.01a
Using Qt version 4.5.2 in /home/s/t/qtsdk-2009.03/qt/lib


Build tools - GNU.
QMake command: /home/s/t/qtsdk-2009.03/qt/bin/qmake - this is correct
Create Qt application project...

First of all - I need manually add Qt include directory... Is that normal? Or it should find them automatically?

Then - build...
Linker error...

Please, fix support of external Qt installations in NetBeans, or at least simple _really_ _working_ howto, plz...

Code:
/usr/bin/make -f nbproject/Makefile-Debug.mk SUBPROJECTS= .build-conf
make[1]: Вход в каталог `/home/s/my/NetBeansProjects/test_qt001'
qmake VPATH=. -o qttmp-Debug.mk nbproject/qt-Debug.pro
mv -f qttmp-Debug.mk nbproject/qt-Debug.mk
/usr/bin/make -f nbproject/qt-Debug.mk dist/Debug/GNU-Linux-x86/test_qt001
make[2]: Вход в каталог `/home/s/my/NetBeansProjects/test_qt001'
g++ -c -pipe -g -Wall -W -O0 -D_REENTRANT  -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -DQT_NO_DEBUG -I/usr/share/qt3/mkspecs/default -Inbproject -I../../../t/qtsdk-2009.03/qt/include -I/usr/include/qt3 -I. -o build/Debug/GNU-Linux-x86/main.o main.cpp
test -d dist/Debug/GNU-Linux-x86/ || mkdir -p dist/Debug/GNU-Linux-x86/
g++  -o dist/Debug/GNU-Linux-x86/test_qt001 build/Debug/GNU-Linux-x86/main.o    -L/usr/share/qt3/lib -L/usr/X11R6/lib -lqt-mt -lXext -lX11 -lm -lpthread
build/Debug/GNU-Linux-x86/main.o: In function `main':
/home/s/my/NetBeansProjects/test_qt001/main.cpp:14: undefined reference to `QApplication::QApplication(int&, char**, int)'
collect2: ld returned 1 exit status
make[2]: *** [dist/Debug/GNU-Linux-x86/test_qt001] Ошибка 1
make[2]: Выход из каталога `/home/s/my/NetBeansProjects/test_qt001'
make[1]: *** [.build-conf] Ошибка 2
make[1]: Выход из каталога `/home/s/my/NetBeansProjects/test_qt001'
make: *** [.build-impl] Ошибка 2
BUILD FAILED (exit value 2, total time: 2s)
Back to top
Alexey Vladykin
Posted via mailing list.





PostPosted: Mon Oct 26, 2009 9:42 am    Post subject: netbeans + qt Reply with quote

I've filed http://www.netbeans.org/issues/show_bug.cgi?id=174731. Feel
free to vote for it and/or add your comments.
I'll investigate the problem closer and either fix it in 6.8 or suggest
a working workaround.

Thanks,
Alexey
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> C/C++ Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo