Results 1 to 2 of 2

Thread: Problems compiling hello world with edyuk

  1. #1
    Join Date
    May 2008
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Unhappy Problems compiling hello world with edyuk

    Hi,

    I'm using Fedora 8 and I've just installed edyuk 1.0.0-rc2 and qt4-devel-4.3.4. I compiled edyuk with no problems, then I run the edyuk and selected new project and new qt gui application. This sample code was generated:
    Qt Code:
    1. #include <QLabel>
    2. #include <QApplication>
    3.  
    4. int main(int argc, char **argv)
    5. {
    6. QApplication app(argc, argv);
    7.  
    8. QLabel l("Hello Qt community!");
    9. l.show();
    10.  
    11. return app.exec();
    12. }
    To copy to clipboard, switch view to plain text mode 

    But pressing the compile & run button gives me this error:

    Qt Code:
    1. -- Task started --
    2.  
    3. >> Step 0 : Generate <<
    4. /home/user/Desktop/edyuk-1.0.0-rc2/hello_world $ qmake "/home/user/Desktop/edyuk-1.0.0-rc2/hello_world/hello_world.pro"
    5.  
    6.  
    7. >> Step 1 : Compile <<
    8. /home/user/Desktop/edyuk-1.0.0-rc2/hello_world $ make ""
    9.  
    10. g++ -c -pipe -Wall -W -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -DQT_NO_DEBUG -DQT_SHARED -DQT_TABLET_SUPPORT -DQT_THREAD_SUPPORT -I/usr/lib/qt-3.3/mkspecs/default -I. -I. -I/usr/lib/qt-3.3/include -o main.o main.cpp
    11. main.cpp:13:18: error: QLabel: nenÃ* souborem ani adresá&#345;em
    12. main.cpp:14:24: error: QApplication: nenÃ* souborem ani adresá&#345;em
    13. main.cpp: In function 'int main(int, char**)':
    14. main.cpp:18: error: 'QApplication' was not declared in this scope
    15. main.cpp:18: error: expected `;' before 'app'
    16. main.cpp:20: error: 'QLabel' was not declared in this scope
    17. main.cpp:20: error: expected `;' before 'l'
    18. main.cpp:21: error: 'l' was not declared in this scope
    19. main.cpp:23: error: 'app' was not declared in this scope
    20. main.cpp: At global scope:
    21. main.cpp:16: warning: unused parameter 'argc'
    22. main.cpp:16: warning: unused parameter 'argv'
    23. make: *** [main.o] Error 1
    24.  
    25. -- Task ended due to error(s) --
    To copy to clipboard, switch view to plain text mode 

    I guess that it can't locate the qt4 headers, QLabel and QApplication, but I have them installed in /usr/include/Qt/ and I have no idea how to tell the edyuk or compiler where it can find those headers.

    Can you please help me solve this problem?
    Thanks in advance, Marty

  2. #2
    Join Date
    May 2008
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Problems compiling hello world with edyuk

    Looks like I have to answer myself. The problem is, that edyuk standartly uses command qmake for generating files necessary for compiling, however, my qmake is QT3 qmake, so the solution is either to relink qmake to qmake-qt4 or, the simplier way, to set qmake command in edyuk to qmake-qt4.

    Marty.

Similar Threads

  1. Compiling Edyuk
    By Salazaar in forum Qt Programming
    Replies: 0
    Last Post: 29th October 2007, 16:11
  2. Compiling problems with mingw32
    By Wali in forum Installation and Deployment
    Replies: 5
    Last Post: 7th September 2007, 10:09

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.