Sunday, July 20th 2008, 2:34pm UTC+1

You are not logged in.

  • Login
  • Register

1

Sunday, March 2nd 2008, 4:18pm

Installing and setting up Qt with Dev-C++

Hei

I have installed Dev-C++ 4.9.9.2 into D:\Dev-Cpp and I downloaded qt-win-opensource-4.3.4-mingw.exe and instelled Qt to D:\Qt\4.3.4

Qt installation asked me where is mingw installed and I pointed D:\Dev-Cpp.

I have added D:\Qt\4.3.4\bin to windows PATH variable.

If I try to compile Qt Hello World

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/****************************************************************
    **
    ** Qt tutorial 1
    **
    ****************************************************************/

    #include <QApplication>
    #include <QPushButton>

    int main(int argc, char *argv[])
    {
        QApplication app(argc, argv);

        QPushButton hello("Hello world!");
        hello.resize(100, 30);

        hello.show();
        return app.exec();
    }


, I get errors, that include files are not found:

7 D:\Pokker\New Folder\main.cpp QApplication: No such file or directory.
8 D:\Pokker\New Folder\main.cpp QPushButton: No such file or directory.

I have added D:\Qt\4.3.4\include and D:\Qt\4.3.4\lib everywhere where it is posibele in Dev-C++.

What else I must do?

And I think that Qt installation in Dev-C++ should be explained here in sticky topic :).

This post has been edited 2 times, last edit by "leho21" (Mar 2nd 2008, 4:20pm)

  • Go to the top of the page

macabre13

Trainee

Posts: 127

Location: Poland/ Wroclaw

Occupation: sw developer

2

Monday, March 3rd 2008, 9:45am

Use the search power young jedi.
- ebm - noise - industrial -
I always could be wrong.
Lets share knowledge!
  • Go to the top of the page

3

Monday, March 3rd 2008, 4:15pm

Now I added .h into #include directive like:

#include <QApplication.h>
#include <QPushButton.h>

and it is working. When I programmed under Linux, then these .h file extensions were not needed. Why? Or there is still something wrong?
  • Go to the top of the page

macabre13

Trainee

Posts: 127

Location: Poland/ Wroclaw

Occupation: sw developer

4

Tuesday, March 4th 2008, 10:22am

In command line type "set" and check the output for global variable "INCLUDE" check that in both systems. Maybe on non-linux you're missing that.
- ebm - noise - industrial -
I always could be wrong.
Lets share knowledge!
  • Go to the top of the page

5

Monday, March 10th 2008, 7:02pm

Dammit, I'm using Xubuntu 7.10 and I don't have any environment variable that describes include path and my programm compiles well with qmake-qt4 and make:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
leho@leho-xubuntu:~/Programming/Qt$ env
SSH_AGENT_PID=7054
SHELL=/bin/bash
DESKTOP_STARTUP_ID=
TERM=xterm
WINDOWID=41943119
USER=leho
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:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=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:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.flac=01;35:*.mp3=01;35:*.mpc=01;35:*.ogg=01;35:*.wav=01;35:
SSH_AUTH_SOCK=/tmp/ssh-ezSvsv7023/agent.7023
GNOME_KEYRING_SOCKET=/tmp/keyring-KJtYWk/socket
SESSION_MANAGER=local/leho-xubuntu:/tmp/.ICE-unix/7065
USERNAME=leho
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
DESKTOP_SESSION=xfce4
GDM_XSERVER_LOCATION=local
PWD=/home/leho/Programming/Qt
LANG=et_EE.UTF-8
GDMSESSION=xfce4
HISTCONTROL=ignoreboth
SHLVL=1
HOME=/home/leho
LOGNAME=leho
XDG_DATA_DIRS=etc/xdg/xubuntu:/usr/local/share/:/usr/share/:/usr/share/gdm/:/usr/share
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-TAaUjszwwO,guid=a6a5bf9598b342ce4f49160047d39b96
LESSOPEN=| /usr/bin/lesspipe %s
WINDOWPATH=7
DISPLAY=:0.0
LESSCLOSE=/usr/bin/lesspipe %s %s
COLORTERM=Terminal
XAUTHORITY=/home/leho/.Xauthority
OLDPWD=/home/leho/Programming
_=/usr/bin/env
leho@leho-xubuntu:~/Programming/Qt$
  • Go to the top of the page

6

Friday, March 14th 2008, 2:46pm

Has anyone managed to use dev c++ command completion with qt?

I have managed to configure dev c++ so that I can build QT apps, but command completion does not work.
  • Go to the top of the page

Rate this thread