PDA

View Full Version : Qt3 Errors



JasonLikesJava
05-01-2002, 11:12 AM
Hello,

I have KDE3 which came with Qt3 designer and libs. I create a project with Qt3 designer and set up a simple main application with textfields, labels, and buttons. Then a ran

$qmake project.pro -o Makefile

Then I ran "make" and I get a bunch of undefined resources errors. I have QTDIR set to /usr/lib/qt3, and my qt3 libs are set in ld.so.conf and ldconfig had been run. I'm running Mandrake 8.2. Has anyone else had this problem?

I would guess that the errors have something to do with a missing library but I don't know what it is. I included -lqt-mt. Is there something missing???

Any help would be greatly appreciated!

Thanx in advance

Lynux-Penguin
05-01-2002, 05:31 PM
http://www.linux.org.sa/projects/alkatib/help.html
http://www.linux-mag.com/2001-12/qt_01.html

hope these help, I don't really do X-Programming, but I know where to find linux resources

rohit
05-06-2002, 07:32 AM
do you have lqt-mt.so or lqt.so check in your lib (qt3 directory) also please tell the error exactly as they appear

JasonLikesJava
05-06-2002, 11:46 AM
Weird...

It works with gcc, but not g++.

(I would include the exact errors but I don't have them on this computer... basically it just gave me undefined resource for every single class I used... guess that means it found the headers but not the libraries)

So now a more general question: what is the difference between gcc and g++? When do you use which?

Lynux-Penguin
05-06-2002, 11:56 PM
.c files should be compiled with gcc
g++ doesn't include all the same libraries as with gcc
gcc is far better. If you must compile classes, then you may use g++ but try to avoid C++ on Linux. C++ on linux is the same thing as microsoft on linux... Isn't pretty.

JasonLikesJava
05-07-2002, 10:15 AM
Avoid C++?? Where could I get some more info on that?

Deckard
05-07-2002, 10:33 AM
Originally posted by JasonLikesJava
So now a more general question: what is the difference between gcc and g++? When do you use which? gcc is the GNU C compiler, and g++ is the GNU C++ compiler.


Originally posted by Lynux-Penguin
If you must compile classes, then you may use g++ but try to avoid C++ on Linux. C++ on linux is the same thing as microsoft on linux... Isn't pretty.C++ works just fine on Linux.

JasonLikesJava
05-07-2002, 10:38 AM
I figured g++ was for C++, so then why would my c++ program compile with gcc and not g++?

Why does this work

gcc -I/usr/lib/qt3/include -L/usr/lib/qt3/lib -o program main.cpp -lqt-mt

but not this

g++ -I/usr/lib/qt3/include -L/usr/lib/qt3/lib -o program main.cpp -lqt-mt

???

Deckard
05-07-2002, 11:14 AM
Post your main.cpp as an attachment, please.

JasonLikesJava
05-07-2002, 11:16 AM
I can't do it now... it isn't on this computer. It won't be until tonight that I can.

JasonLikesJava
05-07-2002, 11:21 AM
Oh, it isn't actually just main.cpp. I used Qt3 designer to make a .ui file and then added the .ui file to my KDevelop project... so I've got a bunch of files.

Deckard
05-07-2002, 12:36 PM
Hmm, in that case I'll just have to leave you with "you're doing something wrong".

Lynux-Penguin
05-07-2002, 08:48 PM
Originally posted by Deckard


C++ works just fine on Linux.

not always for example some C++ Console functions are made for dos and don't run on Linux and cout<< has some REAL buffer problems if you use another compiler besides g++ on linux. C++ has a new way for dealing with streams (found in the iostream, io istream and ostream header files) that make it quite incompatable with linux until g++ arrived.
C is the Linux Home language like english is to us (most)
C++ is linux's foreign language but it still can be compatible with it on a certain scale.

Lynux-Penguin
05-07-2002, 10:53 PM
http://docs.linux.com/article.pl?sid=02/05/04/0122233
may this bring you happiness and answers if not keep posting

Deckard
05-08-2002, 05:51 AM
Originally posted by Lynux-Penguin
not always for example some C++ Console functions are made for dos and don't run on LinuxWhich functions, pray tell, are you talking about? I would love to see code examples of the flaws you seem to have sole knowledge of.

Any functions that "are made for dos and don't run on Linux" are certainly not part of the ANSI or ISO standards.

JasonLikesJava
05-08-2002, 10:14 AM
As for the original problem, screw it. I'll just keep using gcc as long as it compiles. Maybe I'll come across the solution eventually.

JasonLikesJava
05-08-2002, 10:35 AM
C++ might not be perfect but I'll just keep using it. It's good enough for me. Hopefully in time it'll only get better and they'll get rid of the bugs it may have.

JasonLikesJava
05-10-2002, 10:17 AM
Not that anyone really cares anymore.... but g++-2.96 worked and g++-3.0.4 didn't for the original problem. As long as it compiles with something I'm happy (for now)