Results 1 to 7 of 7

Thread: QApplication: No such file or directory

  1. #1
    Join Date
    Sep 2008
    Location
    Portugal
    Posts
    171
    Thanks
    57
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default QApplication: No such file or directory

    Hi
    I've been using Qt Creator for a while and almost forgot the command line (wish can be a bad thing).
    Today i tried to build a simple "Hello World" and got the message that i used as title.
    How to fix this:
    1. Add another environment variable
    2. tell the linked where to find the "include" folders
    3. something more obvious i'm missing here


    This is my printenv:
    Qt Code:
    1. GPG_AGENT_INFO=/tmp/seahorse-B5a4Ss/S.gpg-agent:5316:1
    2. SHELL=/bin/bash
    3. DESKTOP_STARTUP_ID=
    4. TERM=xterm
    5. GTK_RC_FILES=/etc/gtk/gtkrc:/home/torrao/.gtkrc-1.2-gnome2
    6. WINDOWID=46137421
    7. QTDIR=/usr/local/Trolltech/Qt-4.5.0/bin
    8. USER=torrao
    9. LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:
    10. SSH_AUTH_SOCK=/tmp/keyring-xXX0XO/ssh
    11. GNOME_KEYRING_SOCKET=/tmp/keyring-xXX0XO/socket
    12. SESSION_MANAGER=local/debian:/tmp/.ICE-unix/5254
    13. USERNAME=torrao
    14. DESKTOP_SESSION=gnome
    15. [COLOR="black"]PATH=/usr/local/Trolltech/Qt-4.5.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/games[/COLOR]
    16. GDM_XSERVER_LOCATION=local
    17. PWD=/home/torrao/Desktop/lixo
    18. LANG=pt_PT.UTF-8
    19. GNOME_KEYRING_PID=5253
    20. GDM_LANG=pt_PT.UTF-8
    21. GDMSESSION=gnome
    22. HISTCONTROL=ignoreboth
    23. HOME=/home/torrao
    24. SHLVL=1
    25. GNOME_DESKTOP_SESSION_ID=Default
    26. LOGNAME=torrao
    27. XDG_DATA_DIRS=/usr/local/share/:/usr/share/:/usr/share/gdm/
    28. DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-rvYorpOyUE,guid=58c5bb41672d280d2f3706ac4a3508aa
    29. WINDOWPATH=7
    30. DISPLAY=:0.0
    31. COLORTERM=gnome-terminal
    32. XAUTHORITY=/home/torrao/.Xauthority
    33. _=/usr/bin/printenv
    34. OLDPWD=/home/torrao
    To copy to clipboard, switch view to plain text mode 

    I'm using Debian and i had to buil Qt with the MySql support.

    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: QApplication: No such file or directory

    QTDIR=/usr/local/Trolltech/Qt-4.5.0/bin
    musn't that be: QTDIR=/usr/local/Trolltech/Qt-4.5.0, The base directory, not the bin dir.

  3. #3
    Join Date
    Sep 2008
    Location
    Portugal
    Posts
    171
    Thanks
    57
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QApplication: No such file or directory

    Humm ... i found qmake in /usr/bin( lrwxrwxrwx 1 root root 23 Abr 27 16:10 /usr/bin/qmake -> /etc/alternatives/qmake ) and /usr/local/Trolltech/Qt-4.5.0/bin

    I guess i will need a fresh install to understand this.

  4. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: QApplication: No such file or directory

    Quote Originally Posted by graciano View Post
    Humm ... i found qmake in /usr/bin( lrwxrwxrwx 1 root root 23 Abr 27 16:10 /usr/bin/qmake -> /etc/alternatives/qmake ) and /usr/local/Trolltech/Qt-4.5.0/bin
    That's good so, because Qt uses ($QTDIR)/bin/qmake and ($QTDIR)/include, so simple change your system variable and all should work fine!

  5. #5
    Join Date
    Sep 2008
    Location
    Portugal
    Posts
    171
    Thanks
    57
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QApplication: No such file or directory

    I had no idea that qmake was already in a fresh install.
    This is were my confusion started.
    I will try again after building Qt.

  6. #6
    Join Date
    Sep 2008
    Location
    Portugal
    Posts
    171
    Thanks
    57
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QApplication: No such file or directory

    uff...it's OK again.
    After a fresh install and building Qt again i went back to the environment variables issue.
    I edited /etc/profile and added this lines:
    Qt Code:
    1. QTDIR="/usr/local/Trolltech/Qt-4.5.1"
    2. export QTDIR
    3.  
    4. PATH=$QTDIR/bin:$PATH
    5. export PATH
    To copy to clipboard, switch view to plain text mode 

    One thing is still bothering me ...
    Qt Code:
    1. # find -name qmake
    2. ./usr/share/qt3/bin/qmake ( lrwxrwxrwx 1 root root 22 Jun 14 19:16 qmake -> ../../../bin/qmake-qt3 )
    3. ./usr/local/Trolltech/Qt-4.5.1/bin/qmake ( -rwxr-xr-x 1 root staff 3917992 Jun 14 22:20 qmake )
    4. ./usr/bin/qmake ( lrwxrwxrwx 1 root root 23 Jun 14 19:16 qmake -> /etc/alternatives/qmake )
    5. ./etc/alternatives/qmake ( lrwxrwxrwx 1 root root 18 Jun 14 22:43 qmake -> /usr/bin/qmake-qt3 )
    6. ./var/lib/dpkg/alternatives/qmake ( -rw-r--r-- 1 root root 44 Jun 14 22:43 qmake
    7. ./home/torrao/qt-x11-opensource-src-4.5.1/bin/qmake ( this is the path i used to buil Qt ...)
    To copy to clipboard, switch view to plain text mode 

    Got lost here trying to follow the simbolic links ... but looks like "there are no alternatives to qmake -> /usr/bin/qmake-qt3" ... at least i don't know how.

  7. #7
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: QApplication: No such file or directory

    For building Qt you don't need any settings. Just invoke the qmake of your "source-directory" only after successfully build it you must tell the application you are going to build which qmake to use. You can do it over your ~./profile, create new symbol links or simply call the qmake with the full path. That on your system are also qmake-qt3 is no problem at all. Just make sure, that a simple "qmake" in your console reaches the right qmake. (I'd preferre the ~/.profile approach.)

Similar Threads

  1. QApplication: no such file or directory
    By jochen_r in forum Newbie
    Replies: 13
    Last Post: 15th November 2008, 21:46
  2. QApplication: No such file or directory
    By panos in forum Newbie
    Replies: 10
    Last Post: 27th August 2007, 11:08
  3. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 15:21
  4. QApplication: No such file or directory
    By Dolinski in forum Newbie
    Replies: 4
    Last Post: 24th May 2007, 05:13
  5. create file in another directory
    By raphaelf in forum Qt Programming
    Replies: 3
    Last Post: 16th February 2006, 10:04

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.