Results 1 to 2 of 2

Thread: Unable to detect the library on QT compilation

  1. #1
    Join Date
    Aug 2008
    Posts
    1
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Unhappy Unable to detect the library on QT compilation

    Hi, I am not able to make a qt C++ file. When i try compiling the Hello World program, this is what I get as output.

    g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/default -I. -I/usr/include/QtCore -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include/QtGui -I/usr/include -I. -I. -I. -o helloworld.o helloworld.cpp
    helloworld.cpp:2:18: error: Qlabel: No such file or directory
    helloworld.cpp: In function ‘int main(int, char**)’:
    helloworld.cpp:7: error: ‘QLabel’ was not declared in this scope
    helloworld.cpp:7: error: ‘label’ was not declared in this scope
    helloworld.cpp:7: error: expected type-specifier before ‘QLabel’
    helloworld.cpp:7: error: expected `;' before ‘QLabel’
    make: *** [helloworld.o] Error 1

    Any helps?

    ls /usr/lib | grep qt command gives me the following output:

    libstrigiqtdbusclient.so.0.5.11
    qt3
    qt4

    ls /usr/lib/qt4 gives me:
    demos examples plugins

    and
    ls /usr/lib/qt3 gives me:
    bin doc etc include lib mkspecs phrasebooks plugins templates translations

    ls /usr/lib/qt3/bin gives me:
    assistant findtr lrelease mergetr msg2qm qm2ts qt20fix qtrename140
    designer linguist lupdate moc qconfig qmake qtconfig uic

    The project file is being created and the above error comes only when running make. Any help would be appreciated.


    Thanks in advance

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Unable to detect the library on QT compilation

    Quote Originally Posted by rhonaldmoses View Post
    helloworld.cpp:2:18: error: Qlabel: No such file or directory
    Change "Qlabel" to "QLabel" in #include directive.

  3. The following user says thank you to jacek for this useful post:

    rhonaldmoses (17th August 2008)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.