Thread: Qt3 Errors

  1. #1
    Registered User JasonLikesJava's Avatar
    Join Date
    Mar 2002
    Posts
    175

    Question Qt3 Errors

    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
    Last edited by JasonLikesJava; 05-01-2002 at 11:29 AM.

  2. #2
    Comment your source code! Lynux-Penguin's Avatar
    Join Date
    Apr 2002
    Posts
    533
    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
    Asking the right question is sometimes more important than knowing the answer.
    Please read the FAQ
    C Reference Card (A MUST!)
    Pointers and Memory
    The Essentials
    CString lib

  3. #3
    Registered User rohit's Avatar
    Join Date
    Feb 2002
    Posts
    69
    do you have lqt-mt.so or lqt.so check in your lib (qt3 directory) also please tell the error exactly as they appear

  4. #4
    Registered User JasonLikesJava's Avatar
    Join Date
    Mar 2002
    Posts
    175
    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?

  5. #5
    Comment your source code! Lynux-Penguin's Avatar
    Join Date
    Apr 2002
    Posts
    533
    .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.
    Asking the right question is sometimes more important than knowing the answer.
    Please read the FAQ
    C Reference Card (A MUST!)
    Pointers and Memory
    The Essentials
    CString lib

  6. #6
    Registered User JasonLikesJava's Avatar
    Join Date
    Mar 2002
    Posts
    175
    Avoid C++?? Where could I get some more info on that?

  7. #7
    The Artful Lurker Deckard's Avatar
    Join Date
    Jan 2002
    Posts
    633
    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.
    Jason Deckard

  8. #8
    Registered User JasonLikesJava's Avatar
    Join Date
    Mar 2002
    Posts
    175
    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

    ???

  9. #9
    The Artful Lurker Deckard's Avatar
    Join Date
    Jan 2002
    Posts
    633
    Post your main.cpp as an attachment, please.
    Jason Deckard

  10. #10
    Registered User JasonLikesJava's Avatar
    Join Date
    Mar 2002
    Posts
    175
    I can't do it now... it isn't on this computer. It won't be until tonight that I can.

  11. #11
    Registered User JasonLikesJava's Avatar
    Join Date
    Mar 2002
    Posts
    175
    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.

  12. #12
    The Artful Lurker Deckard's Avatar
    Join Date
    Jan 2002
    Posts
    633
    Hmm, in that case I'll just have to leave you with "you're doing something wrong".
    Jason Deckard

  13. #13
    Comment your source code! Lynux-Penguin's Avatar
    Join Date
    Apr 2002
    Posts
    533
    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.
    Asking the right question is sometimes more important than knowing the answer.
    Please read the FAQ
    C Reference Card (A MUST!)
    Pointers and Memory
    The Essentials
    CString lib

  14. #14
    Comment your source code! Lynux-Penguin's Avatar
    Join Date
    Apr 2002
    Posts
    533
    http://docs.linux.com/article.pl?sid=02/05/04/0122233
    may this bring you happiness and answers if not keep posting
    Asking the right question is sometimes more important than knowing the answer.
    Please read the FAQ
    C Reference Card (A MUST!)
    Pointers and Memory
    The Essentials
    CString lib

  15. #15
    The Artful Lurker Deckard's Avatar
    Join Date
    Jan 2002
    Posts
    633
    Originally posted by Lynux-Penguin
    not always for example some C++ Console functions are made for dos and don't run on Linux
    Which 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.
    Jason Deckard

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. global namespace errors
    By stubaan in forum C++ Programming
    Replies: 9
    Last Post: 04-02-2008, 03:11 PM
  2. Ten Errors
    By AverageSoftware in forum Contests Board
    Replies: 0
    Last Post: 07-20-2007, 10:50 AM
  3. Winsock compilation errors
    By jmd15 in forum Networking/Device Communication
    Replies: 2
    Last Post: 08-03-2005, 08:00 AM
  4. Stupid compiler errors
    By ChrisEacrett in forum C++ Programming
    Replies: 9
    Last Post: 11-30-2003, 05:44 PM
  5. Another Qt3 Error
    By JasonLikesJava in forum Linux Programming
    Replies: 2
    Last Post: 05-07-2002, 10:17 AM