Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 5

Qt-interest Archive, February 2008
Dependency problem with console application.


Message 1 in thread

I did a simple main.cpp to create a console program for windows. IÂm using  
the "Dependency Walker"(from Visual Studio 2005) to show the dependencies.  
My .pro is:

TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .

# Input
CONFIG += console
QT -= gui
SOURCES += main.cpp

and the qtgui4.dll are included as dependency. Is there some thing wrong ?

PS: My sistem (XP SP2, Qt 4.2.3 Open Source).

Regards,
Jefferson.

--
 [ signature omitted ] 

Message 2 in thread

Check that you don't use any GUI features. Creating a console program  
doesn't forbid using graphical things.

On Sun, 24 Feb 2008 22:06:35 +0300, Jefferson Costa  
<jsampaio123@xxxxxxxxxxxx> wrote:
> I did a simple main.cpp to create a console program for windows. I´m  
> using the "Dependency Walker"(from Visual Studio 2005) to show the  
> dependencies. My .pro is:
>
> TEMPLATE = app
> TARGET =
> DEPENDPATH += .
> INCLUDEPATH += .
>
> # Input
> CONFIG += console
> QT -= gui
> SOURCES += main.cpp
>
> and the qtgui4.dll are included as dependency. Is there some thing wrong  
> ?
>
> PS: My sistem (XP SP2, Qt 4.2.3 Open Source).
>
> Regards,
> Jefferson.
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with  
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/

-- 
 [ signature omitted ] 

Message 3 in thread

Something I did resolve an issue I had before was to print the contents 
of CONFIG and QT using

message( $$CONFIG )

since there are several default includes

Brian!

Jefferson Costa wrote:
> I did a simple main.cpp to create a console program for windows. IÂm 
> using the "Dependency Walker"(from Visual Studio 2005) to show the 
> dependencies. My .pro is:
>
> TEMPLATE = app
> TARGET =
> DEPENDPATH += .
> INCLUDEPATH += .
>
> # Input
> CONFIG += console
> QT -= gui
> SOURCES += main.cpp
>
> and the qtgui4.dll are included as dependency. Is there some thing 
> wrong ?
>
> PS: My sistem (XP SP2, Qt 4.2.3 Open Source).
>
> Regards,
> Jefferson.
>
> -- 
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with 
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>

--
 [ signature omitted ] 

Message 4 in thread

Hi,

> and the qtgui4.dll are included as dependency. Is there some thing wrong ?

Which are the other dependencies? QtGui4.dll might a dependency of another 
dependency.

--
 [ signature omitted ] 

Message 5 in thread

If he turns off the gui module with QT-=gui then there should be nothing from the GUI module depending on it...



-----Original Message-----
From: Dimitri [mailto:dimitri@xxxxxxxxxxxxx] 
Sent: Sunday, February 24, 2008 2:51 PM
To: qt-interest@xxxxxxxxxxxxx
Subject: Re: Dependency problem with console application.

Hi,

> and the qtgui4.dll are included as dependency. Is there some thing wrong ?

Which are the other dependencies? QtGui4.dll might a dependency of another 
dependency.

--
 [ signature omitted ] 

Message 6 in thread

Hi,

> If he turns off the gui module with QT-=gui then there should be nothing from the GUI module depending on it...

For example Qt3Support does depend on QtQgui. I'd like to see which exact 
dependencies have been pulled in.

Alternatively providing the Makefile should help. By the way, was the Makefile 
  regenerated after modifying the *.pro file?

--
 [ signature omitted ] 

Message 7 in thread

Ok. Here they are.

The main.cpp file:

#include <QApplication>

int main(int argc, char *argv[])
{
	QApplication app(argc, argv);
	qDebug("ImpressÃo... \n");
	return app.exec();
}

and all the dependency list:

kernel32.dll
mingwm10.dll
msvcrt.dll
qtcore4.dll
qtgui4.dll

Regards,
Jefferson.



Em Mon, 25 Feb 2008 05:27:52 -0300, Dimitri <dimitri@xxxxxxxxxxxxx>  
escreveu:

> Hi,
>
>> If he turns off the gui module with QT-=gui then there should be  
>> nothing from the GUI module depending on it...
>
> For example Qt3Support does depend on QtQgui. I'd like to see which  
> exact dependencies have been pulled in.
>
> Alternatively providing the Makefile should help. By the way, was the  
> Makefile   regenerated after modifying the *.pro file?
>
> --
> Dimitri
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with  
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>
> Esta mensagem foi verificada pelo E-mail Protegido Terra.
> Scan engine: McAfee VirusScan / Atualizado em 22/02/2008 / Versïo:  
> 5.2.00/5236
> Proteja o seu e-mail Terra: http://mail.terra.com.br/
>


--
 [ signature omitted ] 

Message 8 in thread

On 25.02.08 08:05:26, Jefferson Costa wrote:
> Ok. Here they are.
>
> The main.cpp file:
>
> #include <QApplication>
>
> int main(int argc, char *argv[])
> {
> 	QApplication app(argc, argv);

You can't use QApplication without QtGui. If you want a console
application and not link against QtGui use QCoreApplication.

Andreas

-- 
 [ signature omitted ] 

Message 9 in thread

Hi,

>> Ok. Here they are.
>>
>> The main.cpp file:
>>
>> #include <QApplication>
>>
>> int main(int argc, char *argv[])
>> {
>> 	QApplication app(argc, argv);
> 
> You can't use QApplication without QtGui. If you want a console
> application and not link against QtGui use QCoreApplication.

Exactly. What I don't understand is that I would have expected a compile-time 
error, such as:
	QApplication: no such header file

On Linux with Qt 4.3:

$ qmake
$ make
g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_CORE_LIB -DQT_SHARED 
-I../qt/4.3/mkspecs/linux-g++ -I. -I../qt/4.3/include/QtCore 
-I../qt/4.3/include/QtCore -I../qt/4.3/include -I. -I. -I. -o main.o main.cpp
main.cpp:1:24: error: QApplication: No such file or directory
main.cpp: In function 'int main(int, char**)':
main.cpp:5: error: 'QApplication' was not declared in this scope
[...]

--
 [ signature omitted ] 

Message 10 in thread

Or a link error...  


-----Original Message-----
From: Dimitri [mailto:dimitri@xxxxxxxxxxxxx] 
Sent: Monday, February 25, 2008 8:43 AM
To: qt-interest@xxxxxxxxxxxxx
Subject: Re: Dependency problem with console application.

Hi,

>> Ok. Here they are.
>>
>> The main.cpp file:
>>
>> #include <QApplication>
>>
>> int main(int argc, char *argv[])
>> {
>> 	QApplication app(argc, argv);
> 
> You can't use QApplication without QtGui. If you want a console
> application and not link against QtGui use QCoreApplication.

Exactly. What I don't understand is that I would have expected a
compile-time 
error, such as:
	QApplication: no such header file

On Linux with Qt 4.3:

$ qmake
$ make
g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_CORE_LIB -DQT_SHARED 
-I../qt/4.3/mkspecs/linux-g++ -I. -I../qt/4.3/include/QtCore 
-I../qt/4.3/include/QtCore -I../qt/4.3/include -I. -I. -I. -o main.o
main.cpp
main.cpp:1:24: error: QApplication: No such file or directory
main.cpp: In function 'int main(int, char**)':
main.cpp:5: error: 'QApplication' was not declared in this scope
[...]

--
 [ signature omitted ] 

Message 11 in thread

Hi,

> Or a link error...  

Yes, but we should have hit the compile-time error before the link-time error.

Jefferson, are you certain the Makefile was (re)generated using the *.pro file 
you've posted? I'd be interested in seeing the *.pro file together with the 
generated Makefile.

--
 [ signature omitted ] 

Message 12 in thread

Sure :). Here they are:

main.cpp:

#include <QCoreApplication>

int main(int argc, char *argv[])
{
	QCoreApplication app(argc, argv);
	qDebug("Impressão... \n");
	return app.exec();
}

console.pro:

TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .

# Input
CONFIG += console
QT -= gui
SOURCES += main.cpp

The Makefile:

first: release
install: release-install
uninstall: release-uninstall
MAKEFILE      = Makefile
QMAKE         = qmake
DEL_FILE      = del
CHK_DIR_EXISTS= if not exist
MKDIR         = mkdir
COPY          = copy /y
COPY_FILE     = $(COPY)
COPY_DIR      = xcopy /s /q /y /i
INSTALL_FILE  = $(COPY_FILE)
INSTALL_PROGRAM = $(COPY_FILE)
INSTALL_DIR   = $(COPY_DIR)
DEL_FILE      = del
SYMLINK       =
DEL_DIR       = rmdir
MOVE          = move
CHK_DIR_EXISTS= if not exist
MKDIR         = mkdir
SUBTARGETS    =  \
		release \
		debug

release: $(MAKEFILE).Release FORCE
	$(MAKE) -f $(MAKEFILE).Release
release-make_default: $(MAKEFILE).Release FORCE
	$(MAKE) -f $(MAKEFILE).Release
release-make_first: $(MAKEFILE).Release FORCE
	$(MAKE) -f $(MAKEFILE).Release first
release-all: $(MAKEFILE).Release FORCE
	$(MAKE) -f $(MAKEFILE).Release all
release-clean: $(MAKEFILE).Release FORCE
	$(MAKE) -f $(MAKEFILE).Release clean
release-distclean: $(MAKEFILE).Release FORCE
	$(MAKE) -f $(MAKEFILE).Release distclean
release-install: $(MAKEFILE).Release FORCE
	$(MAKE) -f $(MAKEFILE).Release install
release-uninstall: $(MAKEFILE).Release FORCE
	$(MAKE) -f $(MAKEFILE).Release uninstall
debug: $(MAKEFILE).Debug FORCE
	$(MAKE) -f $(MAKEFILE).Debug
debug-make_default: $(MAKEFILE).Debug FORCE
	$(MAKE) -f $(MAKEFILE).Debug
debug-make_first: $(MAKEFILE).Debug FORCE
	$(MAKE) -f $(MAKEFILE).Debug first
debug-all: $(MAKEFILE).Debug FORCE
	$(MAKE) -f $(MAKEFILE).Debug all
debug-clean: $(MAKEFILE).Debug FORCE
	$(MAKE) -f $(MAKEFILE).Debug clean
debug-distclean: $(MAKEFILE).Debug FORCE
	$(MAKE) -f $(MAKEFILE).Debug distclean
debug-install: $(MAKEFILE).Debug FORCE
	$(MAKE) -f $(MAKEFILE).Debug install
debug-uninstall: $(MAKEFILE).Debug FORCE
	$(MAKE) -f $(MAKEFILE).Debug uninstall

Makefile: console.pro  c:\Qt\4.2.3\mkspecs\default\qmake.conf  
C:/Qt/4.2.3/mkspecs/qconfig.pri \
		c:\Qt\4.2.3\mkspecs\features\qt_functions.prf \
		c:\Qt\4.2.3\mkspecs\features\qt_config.prf \
		c:\Qt\4.2.3\mkspecs\features\exclusive_builds.prf \
		c:\Qt\4.2.3\mkspecs\features\default_pre.prf \
		c:\Qt\4.2.3\mkspecs\features\win32\default_pre.prf \
		c:\Qt\4.2.3\mkspecs\features\release.prf \
		c:\Qt\4.2.3\mkspecs\features\debug_and_release.prf \
		c:\Qt\4.2.3\mkspecs\features\default_post.prf \
		c:\Qt\4.2.3\mkspecs\features\win32\rtti.prf \
		c:\Qt\4.2.3\mkspecs\features\win32\exceptions.prf \
		c:\Qt\4.2.3\mkspecs\features\win32\stl.prf \
		c:\Qt\4.2.3\mkspecs\features\shared.prf \
		c:\Qt\4.2.3\mkspecs\features\warn_on.prf \
		c:\Qt\4.2.3\mkspecs\features\qt.prf \
		c:\Qt\4.2.3\mkspecs\features\win32\thread.prf \
		c:\Qt\4.2.3\mkspecs\features\moc.prf \
		c:\Qt\4.2.3\mkspecs\features\win32\windows.prf \
		c:\Qt\4.2.3\mkspecs\features\resources.prf \
		c:\Qt\4.2.3\mkspecs\features\uic.prf \
		c:\Qt\4.2.3\lib\qtmain.prl
	$(QMAKE) -win32 -o Makefile console.pro
C:/Qt/4.2.3/mkspecs/qconfig.pri:
c:\Qt\4.2.3\mkspecs\features\qt_functions.prf:
c:\Qt\4.2.3\mkspecs\features\qt_config.prf:
c:\Qt\4.2.3\mkspecs\features\exclusive_builds.prf:
c:\Qt\4.2.3\mkspecs\features\default_pre.prf:
c:\Qt\4.2.3\mkspecs\features\win32\default_pre.prf:
c:\Qt\4.2.3\mkspecs\features\release.prf:
c:\Qt\4.2.3\mkspecs\features\debug_and_release.prf:
c:\Qt\4.2.3\mkspecs\features\default_post.prf:
c:\Qt\4.2.3\mkspecs\features\win32\rtti.prf:
c:\Qt\4.2.3\mkspecs\features\win32\exceptions.prf:
c:\Qt\4.2.3\mkspecs\features\win32\stl.prf:
c:\Qt\4.2.3\mkspecs\features\shared.prf:
c:\Qt\4.2.3\mkspecs\features\warn_on.prf:
c:\Qt\4.2.3\mkspecs\features\qt.prf:
c:\Qt\4.2.3\mkspecs\features\win32\thread.prf:
c:\Qt\4.2.3\mkspecs\features\moc.prf:
c:\Qt\4.2.3\mkspecs\features\win32\windows.prf:
c:\Qt\4.2.3\mkspecs\features\resources.prf:
c:\Qt\4.2.3\mkspecs\features\uic.prf:
c:\Qt\4.2.3\lib\qtmain.prl:
qmake: qmake_all FORCE
	@$(QMAKE) -win32 -o Makefile console.pro

qmake_all: FORCE

make_default: release-make_default debug-make_default FORCE
make_first: release-make_first debug-make_first FORCE
all: release-all debug-all FORCE
clean: release-clean debug-clean FORCE
distclean: release-distclean debug-distclean FORCE
	-$(DEL_FILE) Makefile

release-mocclean: $(MAKEFILE).Release
	$(MAKE) -f $(MAKEFILE).Release mocclean
debug-mocclean: $(MAKEFILE).Debug
	$(MAKE) -f $(MAKEFILE).Debug mocclean
mocclean: release-mocclean debug-mocclean

release-mocables: $(MAKEFILE).Release
	$(MAKE) -f $(MAKEFILE).Release mocables
debug-mocables: $(MAKEFILE).Debug
	$(MAKE) -f $(MAKEFILE).Debug mocables
mocables: release-mocables debug-mocables
FORCE:

$(MAKEFILE).Release: Makefile
$(MAKEFILE).Debug: Makefile



And it works, after changed QApplication to QCoreApplication class. It was  
compiled by Visual Studio 2005, Qt 4.2.3 Open Source for windows.

Regards, :)
Jefferson.

Em Mon, 25 Feb 2008 14:07:29 -0300, Dimitri <dimitri@xxxxxxxxxxxxx>  
escreveu:

> Hi,
>
>> Or a link error...
>
> Yes, but we should have hit the compile-time error before the link-time  
> error.
>
> Jefferson, are you certain the Makefile was (re)generated using the  
> *.pro file you've posted? I'd be interested in seeing the *.pro file  
> together with the generated Makefile.
>
> --
> Dimitri
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with  
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>
> Esta mensagem foi verificada pelo E-mail Protegido Terra.
> Scan engine: McAfee VirusScan / Atualizado em 22/02/2008 / Versão:  
> 5.2.00/5236
> Proteja o seu e-mail Terra: http://mail.terra.com.br/
>


--
 [ signature omitted ] 

Message 13 in thread

On 25.02.08 18:11:20, Jefferson Costa wrote:
> Sure :). Here they are:

More interesting are the Makefile.Release and Makefile.Debug
as those contain the actual compiler commands.

Andreas

-- 
 [ signature omitted ] 

Message 14 in thread

Ok. Here they are too :):

Makefile.Release:

####### Compiler, tools and options

CC            = gcc
CXX           = g++
LEX           = flex
YACC          = byacc
DEFINES       = -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG  
-DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN
CFLAGS        = -O2 -O2 -Wall $(DEFINES)
CXXFLAGS      = -O2 -O2 -frtti -fexceptions -Wall $(DEFINES)
LEXFLAGS      =
YACCFLAGS     = -d
INCPATH       = -I"C:/Qt/4.2.3/include/QtCore"  
-I"C:/Qt/4.2.3/include/QtCore" -I"C:/Qt/4.2.3/include/QtGui"  
-I"C:/Qt/4.2.3/include/QtGui" -I"C:/Qt/4.2.3/include" -I"."  
-I"C:/Qt/4.2.3/include/ActiveQt" -I"release" -I"."  
-I"c:\Qt\4.2.3\mkspecs\default"
LINK        =        g++
LFLAGS        =        -mthreads -Wl,-enable-stdcall-fixup  
-Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -Wl,-s  
-Wl,-subsystem,windows
LIBS        =        -L"c:\Qt\4.2.3\lib" -lmingw32 -lqtmain -lQtGui4  
-lQtCore4
QMAKE         = qmake
IDC           = c:\Qt\4.2.3\bin\idc.exe
IDL           = midl
ZIP           = zip -r -9
DEF_FILE      =
RES_FILE      =
COPY          = copy /y
COPY_FILE     = $(COPY)
COPY_DIR      = xcopy /s /q /y /i
DEL_FILE      = del
DEL_DIR       = rmdir
MOVE          = move
CHK_DIR_EXISTS= if not exist
MKDIR         = mkdir
INSTALL_FILE    = $(COPY_FILE)
INSTALL_PROGRAM = $(COPY_FILE)
INSTALL_DIR     = $(COPY_DIR)

####### Output directory

OBJECTS_DIR   = release

####### Files

SOURCES       = main.cpp
OBJECTS       = release\main.o
DIST          =
QMAKE_TARGET  = console
DESTDIR        = release\ #avoid trailing-slash linebreak
TARGET         = console.exe
DESTDIR_TARGET = release\console.exe

####### Implicit rules

.SUFFIXES: .cpp .cc .cxx .c

.cpp.o:
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.cc.o:
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.cxx.o:
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.c.o:
	$(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<

####### Build rules

first: all
all: Makefile.Release  $(DESTDIR_TARGET)

$(DESTDIR_TARGET):  $(OBJECTS)
	$(LINK) $(LFLAGS) -o "$(DESTDIR_TARGET)" $(OBJECTS)  $(LIBS)


qmake:  FORCE
	@$(QMAKE) -win32 -o Makefile.Release console.pro

dist:
	$(ZIP) console.zip $(SOURCES) $(DIST) console.pro  
C:/Qt/4.2.3/mkspecs/qconfig.pri  
c:\Qt\4.2.3\mkspecs\features\qt_functions.prf  
c:\Qt\4.2.3\mkspecs\features\qt_config.prf  
c:\Qt\4.2.3\mkspecs\features\exclusive_builds.prf  
c:\Qt\4.2.3\mkspecs\features\default_pre.prf  
c:\Qt\4.2.3\mkspecs\features\win32\default_pre.prf  
c:\Qt\4.2.3\mkspecs\features\release.prf  
c:\Qt\4.2.3\mkspecs\features\debug_and_release.prf  
c:\Qt\4.2.3\mkspecs\features\default_post.prf  
c:\Qt\4.2.3\mkspecs\features\build_pass.prf  
c:\Qt\4.2.3\mkspecs\features\Release.prf  
c:\Qt\4.2.3\mkspecs\features\win32\rtti.prf  
c:\Qt\4.2.3\mkspecs\features\win32\exceptions.prf  
c:\Qt\4.2.3\mkspecs\features\win32\stl.prf  
c:\Qt\4.2.3\mkspecs\features\shared.prf  
c:\Qt\4.2.3\mkspecs\features\warn_on.prf  
c:\Qt\4.2.3\mkspecs\features\qt.prf  
c:\Qt\4.2.3\mkspecs\features\win32\thread.prf  
c:\Qt\4.2.3\mkspecs\features\moc.prf  
c:\Qt\4.2.3\mkspecs\features\win32\windows.prf  
c:\Qt\4.2.3\mkspecs\features\resources.prf  
c:\Qt\4.2.3\mkspecs\features\uic.prf c:\Qt\4.2.3\lib\qtmain.prl  HEADERS  
RESOURCES IMAGES SOURCES FORMS

clean: compiler_clean
	-$(DEL_FILE) release\main.o

distclean: clean
	-$(DEL_FILE) "$(DESTDIR_TARGET)"
	-$(DEL_FILE) Makefile.Release

mocclean: compiler_moc_header_clean compiler_moc_source_clean

mocables: compiler_moc_header_make_all compiler_moc_source_make_all

compiler_moc_header_make_all:
compiler_moc_header_clean:
compiler_rcc_make_all:
compiler_rcc_clean:
compiler_image_collection_make_all: qmake_image_collection.cpp
compiler_image_collection_clean:
	-$(DEL_FILE) qmake_image_collection.cpp
compiler_moc_source_make_all:
compiler_moc_source_clean:
compiler_uic_make_all:
compiler_uic_clean:
compiler_clean: compiler_moc_header_clean compiler_rcc_clean  
compiler_image_collection_clean compiler_moc_source_clean  
compiler_uic_clean



####### Compile

release\main.o: main.cpp
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\main.o main.cpp

####### Install

install:   FORCE

uninstall:   FORCE

FORCE:


Makefile.Debug:

####### Compiler, tools and options

CC            = gcc
CXX           = g++
LEX           = flex
YACC          = byacc
DEFINES       = -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB  
-DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN
CFLAGS        = -g -g -Wall $(DEFINES)
CXXFLAGS      = -g -g -frtti -fexceptions -Wall $(DEFINES)
LEXFLAGS      =
YACCFLAGS     = -d
INCPATH       = -I"C:/Qt/4.2.3/include/QtCore"  
-I"C:/Qt/4.2.3/include/QtCore" -I"C:/Qt/4.2.3/include/QtGui"  
-I"C:/Qt/4.2.3/include/QtGui" -I"C:/Qt/4.2.3/include" -I"."  
-I"C:/Qt/4.2.3/include/ActiveQt" -I"debug" -I"."  
-I"c:\Qt\4.2.3\mkspecs\default"
LINK        =        g++
LFLAGS        =        -mthreads -Wl,-enable-stdcall-fixup  
-Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc  
-Wl,-subsystem,windows
LIBS        =        -L"c:\Qt\4.2.3\lib" -lmingw32 -lqtmaind -lQtGuid4  
-lQtCored4
QMAKE         = qmake
IDC           = c:\Qt\4.2.3\bin\idc.exe
IDL           = midl
ZIP           = zip -r -9
DEF_FILE      =
RES_FILE      =
COPY          = copy /y
COPY_FILE     = $(COPY)
COPY_DIR      = xcopy /s /q /y /i
DEL_FILE      = del
DEL_DIR       = rmdir
MOVE          = move
CHK_DIR_EXISTS= if not exist
MKDIR         = mkdir
INSTALL_FILE    = $(COPY_FILE)
INSTALL_PROGRAM = $(COPY_FILE)
INSTALL_DIR     = $(COPY_DIR)

####### Output directory

OBJECTS_DIR   = debug

####### Files

SOURCES       = main.cpp
OBJECTS       = debug\main.o
DIST          =
QMAKE_TARGET  = console
DESTDIR        = debug\ #avoid trailing-slash linebreak
TARGET         = console.exe
DESTDIR_TARGET = debug\console.exe

####### Implicit rules

.SUFFIXES: .cpp .cc .cxx .c

.cpp.o:
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.cc.o:
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.cxx.o:
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.c.o:
	$(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<

####### Build rules

first: all
all: Makefile.Debug  $(DESTDIR_TARGET)

$(DESTDIR_TARGET):  $(OBJECTS)
	$(LINK) $(LFLAGS) -o "$(DESTDIR_TARGET)" $(OBJECTS)  $(LIBS)


qmake:  FORCE
	@$(QMAKE) -win32 -o Makefile.Debug console.pro

dist:
	$(ZIP) console.zip $(SOURCES) $(DIST) console.pro  
C:/Qt/4.2.3/mkspecs/qconfig.pri  
c:\Qt\4.2.3\mkspecs\features\qt_functions.prf  
c:\Qt\4.2.3\mkspecs\features\qt_config.prf  
c:\Qt\4.2.3\mkspecs\features\exclusive_builds.prf  
c:\Qt\4.2.3\mkspecs\features\default_pre.prf  
c:\Qt\4.2.3\mkspecs\features\win32\default_pre.prf  
c:\Qt\4.2.3\mkspecs\features\debug.prf  
c:\Qt\4.2.3\mkspecs\features\debug_and_release.prf  
c:\Qt\4.2.3\mkspecs\features\default_post.prf  
c:\Qt\4.2.3\mkspecs\features\build_pass.prf  
c:\Qt\4.2.3\mkspecs\features\Debug.prf  
c:\Qt\4.2.3\mkspecs\features\win32\rtti.prf  
c:\Qt\4.2.3\mkspecs\features\win32\exceptions.prf  
c:\Qt\4.2.3\mkspecs\features\win32\stl.prf  
c:\Qt\4.2.3\mkspecs\features\shared.prf  
c:\Qt\4.2.3\mkspecs\features\warn_on.prf  
c:\Qt\4.2.3\mkspecs\features\qt.prf  
c:\Qt\4.2.3\mkspecs\features\win32\thread.prf  
c:\Qt\4.2.3\mkspecs\features\moc.prf  
c:\Qt\4.2.3\mkspecs\features\win32\windows.prf  
c:\Qt\4.2.3\mkspecs\features\resources.prf  
c:\Qt\4.2.3\mkspecs\features\uic.prf c:\Qt\4.2.3\lib\qtmaind.prl  HEADERS  
RESOURCES IMAGES SOURCES FORMS

clean: compiler_clean
	-$(DEL_FILE) debug\main.o

distclean: clean
	-$(DEL_FILE) "$(DESTDIR_TARGET)"
	-$(DEL_FILE) Makefile.Debug

mocclean: compiler_moc_header_clean compiler_moc_source_clean

mocables: compiler_moc_header_make_all compiler_moc_source_make_all

compiler_moc_header_make_all:
compiler_moc_header_clean:
compiler_rcc_make_all:
compiler_rcc_clean:
compiler_image_collection_make_all: qmake_image_collection.cpp
compiler_image_collection_clean:
	-$(DEL_FILE) qmake_image_collection.cpp
compiler_moc_source_make_all:
compiler_moc_source_clean:
compiler_uic_make_all:
compiler_uic_clean:
compiler_clean: compiler_moc_header_clean compiler_rcc_clean  
compiler_image_collection_clean compiler_moc_source_clean  
compiler_uic_clean



####### Compile

debug\main.o: main.cpp
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\main.o main.cpp

####### Install

install:   FORCE

uninstall:   FORCE

FORCE:


Any thing else ? :)

Regards,
Jefferson.

Em Mon, 25 Feb 2008 18:57:08 -0300, Andreas Pakulat <apaku@xxxxxx>  
escreveu:

> On 25.02.08 18:11:20, Jefferson Costa wrote:
>> Sure :). Here they are:
>
> More interesting are the Makefile.Release and Makefile.Debug
> as those contain the actual compiler commands.
>
> Andreas
>


--
 [ signature omitted ] 

Message 15 in thread

> Von: "Jefferson Costa"
> Ok. Here they are too :):
> 
> Makefile.Release:
> 
> ####### Compiler, tools and options
> 
...
 INCPATH       = -I"C:/Qt/4.2.3/include/QtCore"  
> -I"C:/Qt/4.2.3/include/QtCore" -I"C:/Qt/4.2.3/include/QtGui"  
> -I"C:/Qt/4.2.3/include/QtGui" -I"C:/Qt/4.2.3/include" -I"."  
> -I"C:/Qt/4.2.3/include/ActiveQt" -I"release" -I"."  
> -I"c:\Qt\4.2.3\mkspecs\default"
> LINK        =        g++
> LFLAGS        =        -mthreads -Wl,-enable-stdcall-fixup  
> -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -Wl,-s  
> -Wl,-subsystem,windows
> LIBS        =        -L"c:\Qt\4.2.3\lib" -lmingw32 -lqtmain -lQtGui4  
> -lQtCore4

As you can see there're still references to QtGui. So qmake did not run after you modified your pro-file. But maybe it's also a bug in your old qmake - try 4.3.3/4.3.4


Christian
-- 
 [ signature omitted ]