軟體 : QT4.4.0
qmake是Trolltech提供的一套簡化在不同平台進行專案的"build(建立)"流程的工具。
qmake is a tool from Trolltech that helps simplify the build process for development project across different platforms.
拿QT所提供的範例來做示範,在QT位置所在的資料夾的 examples/qmake/tutorial中有:
hello.h
hello.cpp
將這兩個檔案copy到C槽,並新建一個"hello"的資料夾來存放這兩個檔案,
打開程式集中的QT4.4.0 Command Prompt
切換到C:\hello
qmake -project =>生成hello.pro,告訴qmake與開發專案相關的souece與header檔的部份。
hello.pro的內容:
qmake是Trolltech提供的一套簡化在不同平台進行專案的"build(建立)"流程的工具。
qmake is a tool from Trolltech that helps simplify the build process for development project across different platforms.
拿QT所提供的範例來做示範,在QT位置所在的資料夾的 examples/qmake/tutorial中有:
hello.h
hello.cpp
將這兩個檔案copy到C槽,並新建一個"hello"的資料夾來存放這兩個檔案,
打開程式集中的QT4.4.0 Command Prompt
切換到C:\hello
qmake -project =>生成hello.pro,告訴qmake與開發專案相關的souece與header檔的部份。
hello.pro的內容:
######################################################################
# Automatically generated by qmake (2.01a) ??? ?? 2 08:09:11 2008
######################################################################
TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
# Input
HEADERS += hello.h
SOURCES += hello.cpp main.cpp
qmake => 生成Makefile文件
此時debug與release兩個資料夾還是空的,
nmake(亦可用make,取決於所使用的compiler) =>執行Makefile中的命令,
此時debug資料夾中出現hello.exe
cd debug =>進入debug資料夾
hello =>運行编譯鏈接好的exe文件
執行的hello.exe
文章標籤
全站熱搜


在執行產生出來的執行檔時,出現了以下的錯誤訊息"無法找到程序輸入點-Z17qt_message_output9tMsgTypePKc (在動態聯結程式庫 QtCore4.dll)" 請問這可能是什麼原因呢? Thanks!!
我在path中都已加入了bin,也確認過這個dll存在bin中,再用make時 ,發現了最後一行訊息"mingw32-make[1]: Leaving directory `C:/11'" 感覺應該這邊就出了錯..當時我在編譯qt時,是用nmake,會是這個原因媽? THANKS!!!
我照著你的教學,但是我好像沒有nmake or make這些指令!!請問該如何解決