Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 25 Oct 2014, 03:12
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
c++ with Qt compilation error
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
kayoKasee

Joined: 04 Jun 2010
Posts: 3

PostPosted: Fri 04 Jun 2010, 11:13    Post_subject:  c++ with Qt compilation error
Sub_title: i can't run my c++ gui file with an error
 

hi guys, has anyone compiled a c++ file with Qt?
I got this error:
'cannot find -lQtGui'
after issuing the 'make' command in the console.
I don't whats this error or do i need additional libraries?
My laptop runs in puppy 4.3.1 with devx.sfs.
I'm a noob in c++ gui and almost using linux distros for 3 months. Really need help.
I have no problems compiling with GTK+. I'm just using Qt because a lot of people recommends it.
Back to top
View user's profile Send_private_message 
muggins

Joined: 20 Jan 2006
Posts: 6688
Location: lisbon

PostPosted: Sun 06 Jun 2010, 07:11    Post_subject:  

Can you mention which program you're trying to compile? Generally, to compile Qt4 programs, you need to install qt4-4.3.2.pet, however you'll often find that newer Qt4 applications will need a newer Qt4 version.
Back to top
View user's profile Send_private_message 
kayoKasee

Joined: 04 Jun 2010
Posts: 3

PostPosted: Sun 06 Jun 2010, 09:43    Post_subject: qt4 program
Sub_title: here's my program
 

muggins wrote:

Can you mention which program you're trying to compile?

Here's what i'm compiling:(copied from trolltech's tutorials)
#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();
}

Quote:

Generally, to compile Qt4 programs, you need to install qt4-4.3.2.pet

Yeh? I thought everything I need is in the devx.sfs file, like the gtkmm. I'll recompile my program again with the additional pet file.
Thanks!
Back to top
View user's profile Send_private_message 
kayoKasee

Joined: 04 Jun 2010
Posts: 3

PostPosted: Tue 08 Jun 2010, 00:11    Post_subject: Re: qt4 program
Sub_title: here's my program
 

Thanks muggins, but same thing happened after I recompiled my program even with qt4-4.3.2.pet installed.
Here's what the error says with the 'make' command:

g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/opt/qt4/mkspecs/linux-g++ -I. -I/opt/qt4/include/QtCore -I/opt/qt4/include/QtCore -I/opt/qt4/include/QtGui -I/opt/qt4/include/QtGui -I/opt/qt4/include -I. -I. -I. -o qt1.o qt1.cc
qt1.cc:13:2: warning: no newline at end of file
g++ -Wl,-rpath,/opt/qt4/lib -o Qt qt1.o -L//opt/qt4/lib -lQtGui -L//opt/qt4/lib -L/usr/X11R6/lib -lpng -lSM -lICE -pthread -L/opt/gnome2/lib -pthread -lXrender -lXrandr -lXfixes -lXcursor -lfreetype -lfontconfig -lXext -lX11 -lQtCore -lz -lm -pthread -lgthread-2.0 -lrt -lglib-2.0 -ldl -lpthread
/usr/lib/gcc/i486-t2-linux-gnu/4.2.2/../../../../i486-t2-linux-gnu/bin/ld: cannot find -lQtGui
collect2: ld returned 1 exit status
make: *** [Qt] Error 1

Where 'Qt' is my project name and 'qt1.cc' is my main file.
could someone who have compiled there Qt apps properly tell me what's wrong? I'm using puppy431 with the equivalent devx.sfs file.
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0526s ][ Queries: 12 (0.0102s) ][ GZIP on ]