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 Fri 01 Aug 2014, 05:58
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 [4 Posts]  
Author Message
kayoKasee

Joined: 04 Jun 2010
Posts: 3

PostPosted: Fri 04 Jun 2010, 11:13    Post subject:  c++ with Qt compilation error
Subject description: 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: 6674
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
Subject description: 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
Subject description: 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 from previous:   Sort by:   
Page 1 of 1 [4 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
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 cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0470s ][ Queries: 11 (0.0058s) ][ GZIP on ]