• 4758阅读
  • 1回复

在QT外面不能生成可执行文件 [复制链接]

上一主题 下一主题
离线greatthanks
 

只看楼主 倒序阅读 楼主  发表于: 2007-06-21
在QT外面不能生成可执行文件
— 本帖被 XChinux 执行加亮操作(2008-07-18) —
遇到一个问题“Hello world”在QT目录下可以生成可执行文件,但是在QT目录外却不能,不知道为什么?

我的系统是WindowsXP+QT4.3.0,装完并配置完后我尝试运行一下examples\tutorial\t1文件,发现在本身目录下做Qmake -project,qmake和Make没有问题,做完之后在Release目录下出现t1.exe

但是我把Main.cpp拷贝到另外一个区,然后再作同样的操作做Qmake -project,qmake和Make没有问题,但是在Release目录下却没有出现可执行文件,不知道为什么?

用Make后在这两个路径下显示的内容不一样,但是我找不到问题出在哪?请大家帮忙看看,谢谢了先
D:\Soft\Qt\4.3.0\examples\tutorial\t1>make
mingw32-make -f Makefile.Debug all
mingw32-make[1]: Entering directory `D:/Soft/Qt/4.3.0/examples/tutorial/t1'
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB
-DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\..\include\QtCore" -I"..\..\..\include\QtCore" -I"..\..\..\include\Qt
Gui" -I"..\..\..\include\QtGui" -I"..\..\..\include" -I"." -I"..\..\..\include\ActiveQt" -I"tmp\moc\debug_shared" -
I"." -I"..\..\..\include" -I"d:\Soft\Dev-Cpp\include" -I"..\..\..\mkspecs\win32-g++" -o tmp\obj\debug_shared\main.o
main.cpp
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,win
dows -o "debug\t1.exe" tmp\obj\debug_shared\main.o  -L"d:\Soft\Qt\4.3.0\lib" -L"d:\Soft\Qt\4.3.0\lib" -L"d:\Soft\De
v-Cpp\lib" -L"d:\Soft\Qt\4.3.0\lib" -lmingw32 -lqtmaind -lQtGuid4 -lQtCored4
mingw32-make[1]: Leaving directory `D:/Soft/Qt/4.3.0/examples/tutorial/t1'
mingw32-make -f Makefile.Release all
mingw32-make[1]: Entering directory `D:/Soft/Qt/4.3.0/examples/tutorial/t1'
g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB
-DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\..\include\QtCore" -I"..\..\..\include\QtCore" -I"..\.
.\..\include\QtGui" -I"..\..\..\include\QtGui" -I"..\..\..\include" -I"." -I"..\..\..\include\ActiveQt" -I"tmp\moc\
release_shared" -I"." -I"..\..\..\include" -I"d:\Soft\Dev-Cpp\include" -I"..\..\..\mkspecs\win32-g++" -o tmp\obj\re
lease_shared\main.o main.cpp
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -mthreads -Wl -Wl,-subsys
tem,windows -o "release\t1.exe" tmp\obj\release_shared\main.o  -L"d:\Soft\Qt\4.3.0\lib" -L"d:\Soft\Qt\4.3.0\lib" -L
"d:\Soft\Dev-Cpp\lib" -L"d:\Soft\Qt\4.3.0\lib" -lmingw32 -lqtmain -lQtGui4 -lQtCore4
mingw32-make[1]: Leaving directory `D:/Soft/Qt/4.3.0/examples/tutorial/t1'

在另外的目录下Make
E:\Test>make
mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `E:/Test'
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB
-DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"d:\Soft\Qt\4.3.0\include\QtCore" -I"d:\Soft\Qt\4.3.0\include\QtCore" -I"d:\
Soft\Qt\4.3.0\include\QtGui" -I"d:\Soft\Qt\4.3.0\include\QtGui" -I"d:\Soft\Qt\4.3.0\include" -I"." -I"d:\Soft\Qt\4.
3.0\include\ActiveQt" -I"debug" -I"." -I"d:\Soft\Qt\4.3.0\mkspecs\win32-g++" -o debug\main.o main.cpp
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,win
dows -o "debug\Test.exe" debug\main.o  -L"d:\Soft\Qt\4.3.0\lib" -lmingw32 -lqtmaind -lQtGuid4 -lQtCored4
mingw32-make[1]: Leaving directory `E:/Test'

显示的内容少了一一些,而且生成的Makefile,Makefile。release等大小都不一样,不知道为什么?

谢谢
[ 此贴被XChinux在2008-07-18 13:50重新编辑 ]
离线greatthanks

只看该作者 1楼 发表于: 2007-06-21
不知道怎么点了一下,发重复了,试一下隐藏好用不
快速回复
限100 字节
 
上一个 下一个