2012-07-10 92 views
5

我的Windows 7機器上安裝了Qt Creator,我的目標是一個OMAP3嵌入式Linux板。我下載了目標工具鏈,用於Windows的Sourcery-G ++ Lite,並在我的Windows機器上安裝了MinGW(http://www.mingw.org/)。在QT Creator中,我將CodeSourcery工具鏈添加爲「手動」工具鏈,如下圖所示。然後,我嘗試通過編輯「模擬時鐘」演示應用程序的「項目」下的「構建設置」,使用此工具鏈構建演示Qt App'analogclock'。但是工具鏈在Build Settings下不可用,如第二張圖所示。在Windows上使用QtCreator進行交叉編譯Linux使用CodeSourcery工具鏈

如何在構建選項中使用Code Sourcery Toolchain從Qt Creator構建此演示應用程序或任何Qt應用程序?我絕對必須使用Windows來完成此操作(不能使用Linux VM ...)。

我認爲這可能與爲目標構建Qt庫有關,但我不確定這是否屬實,或者如何在Windows上執行此操作。我非常感謝您的幫助和洞察力。

Qt Creator CodeSourcery Toolchain

Qt Creator Build Settings

編輯:新的信息 - 需要幫助配置Qt Creator中:

我使用CodeSourcery的工具鏈構建了Qt 4.8庫沒有錯誤,我有。因此在遵循http://c2143.blogspot.com/?view=classic之後在/ lib目錄中存在文件。現在我試圖掛鉤CodeSourcery編譯器並將Qt 4.8構建到Qt Creator中,以便爲目標板創建示例應用程序。

我閱讀下面的文章: http://doc.qt.nokia.com/qtcreator-2.4/creator-project-qmake.html http://doc.qt.nokia.com/qtcreator-2.4/creator-tool-chains.html 描述如何Qt的新版本工具鏈添加到Qt Creator的。請參閱附件中的圖像,瞭解我如何配置Qt Creator。我正在使用Qt Creator 2.4.1。

Qt Versions Toolchains Buildsettings

我得到一個錯誤,沒有太多的信息粘貼下面......在這個或我的配置有什麼想法?

09:51:07: Running build steps for project analogclock... 
09:51:07: Configuration unchanged, skipping qmake step. 
09:51:07: Starting: "C:\QtSDK\mingw\bin\mingw32-make.exe" 
arm-none-linux-gnueabi-g++ -c -pipe -march=armv7-a -mtune=cortex-a8 -mthumb -mfpu=neon -mfloat-abi=softfp -Wa,-mimplicit-it=thumb -O2 -Wall -W -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I"..\qt-4.8-src\include\QtCore" -I"..\qt-4.8-src\include\QtNetwork" -I"..\qt-4.8-src\include\QtGui" -I"..\qt-4.8-src\include" -I"." -I"c:\QtSDK\Examples\4.7\widgets\analogclock" -I"." -I"..\qt-4.8-src\mkspecs\default" -o analogclock.obj c:\QtSDK\Examples\4.7\widgets\analogclock\analogclock.cpp 
arm-none-linux-gnueabi-g++ -c -pipe -march=armv7-a -mtune=cortex-a8 -mthumb -mfpu=neon -mfloat-abi=softfp -Wa,-mimplicit-it=thumb -O2 -Wall -W -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I"..\qt-4.8-src\include\QtCore" -I"..\qt-4.8-src\include\QtNetwork" -I"..\qt-4.8-src\include\QtGui" -I"..\qt-4.8-src\include" -I"." -I"c:\QtSDK\Examples\4.7\widgets\analogclock" -I"." -I"..\qt-4.8-src\mkspecs\default" -o main.obj c:\QtSDK\Examples*\4.7\widgets\analogclock\main.cpp 
C:\Users\pclass\Desktop\qt_creator_toolchain\qt-4.8-src\bin\moc.exe -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I"..\qt-4.8-src\include\QtCore" -I"..\qt-4.8-src\include\QtNetwork" -I"..\qt-4.8-src\include\QtGui" -I"..\qt-4.8-src\include" -I"." -I"c:\QtSDK\Examples\4.7\widgets\analogclock" -I"." -I"..\qt-4.8-src\mkspecs\default" c:\QtSDK\Examples\4.7\widgets\analogclock\analogclock.h -o moc_analogclock.cpp 
mingw32-make.exe: *** [moc_analogclock.cpp] Error -1073741515 
09:51:09: The process "C:\QtSDK\mingw\bin\mingw32-make.exe" exited with code 2. 
Error while building project analogclock (target: Desktop) 
When executing build step 'Make' 

回答

1

我將mingw添加到路徑中,然後進行構建併成功。如果我在該示例上執行「文件」命令,它會給我以下內容,看起來很有希望。現在在棋盤上試試它。

$文件analogclock analogclock:ELF 32位LSB的可執行文件,ARM,版本1(SYSV),動態鏈接(使用共享庫),爲GNU/Linux 2.6.16,不可剝離

1

您首先需要針對目標的Qt庫。您可以使用CodeSourcery工具鏈進行構建。然後,一些工具(qmake,moc ...)和庫可用。

+0

感謝您的評論 - 請看我修改的問題。 – PhilBot 2012-07-13 15:10:31

相關問題