0
我一直在嘗試編譯Ogre幾個星期,或者試圖使用預編譯版本(顯然它與構建的編譯器不兼容),現在我已經足夠了。我在Ogre 1.8.1源碼上運行了CMake 2.8.11來生成Code :: Blocks 12.11項目。按C中的 「編譯」 按鈕:: B給我了以下幾點:預處理失敗
生成日誌:
-------------- Build: all in OGRE (compiler: GNU GCC Compiler)---------------
Running command: C:\MinGW\bin\mingw32-make.exe -f "C:/Users/Conscious Code/Desktop/ogre_src_v1-8-1/Makefile" VERBOSE=1 all
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -H"C:\Users\Conscious Code\Desktop\ogre_src_v1-8-1" -B"C:\Users\Conscious Code\Desktop\ogre_src_v1-8-1" --check-build-system CMakeFiles\Makefile.cmake 0
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -E cmake_progress_start "C:\Users\Conscious Code\Desktop\ogre_src_v1-8-1\CMakeFiles" "C:\Users\Conscious Code\Desktop\ogre_src_v1-8-1\CMakeFiles\progress.marks"
C:/MinGW/bin/mingw32-make -f CMakeFiles\Makefile2 all
mingw32-make[1]: Entering directory `C:/Users/Conscious Code/Desktop/ogre_src_v1-8-1'
C:/MinGW/bin/mingw32-make -f OgreMain\CMakeFiles\OgreMain.dir\build.make OgreMain/CMakeFiles/OgreMain.dir/depend
mingw32-make[2]: Entering directory `C:/Users/Conscious Code/Desktop/ogre_src_v1-8-1'
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -E cmake_progress_report "C:\Users\Conscious Code\Desktop\ogre_src_v1-8-1\CMakeFiles"
[ 0%]
Generating OgreWin32Resources.rc.obj
cd /d OgreMain && "C:\Program Files (x86)\CodeBlocks\MinGW\bin\windres.exe" "-IC:/Users/Conscious Code/Desktop/ogre_src_v1-8-1/OgreMain/src/WIN32" "-iC:/Users/Conscious Code/Desktop/ogre_src_v1-8-1/OgreMain/src/WIN32/OgreWin32Resources.rc" "-oC:/Users/Conscious Code/Desktop/ogre_src_v1-8-1/OgreMain/OgreWin32Resources.rc.obj"
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
C:\Program Files (x86)\CodeBlocks\MinGW\bin\windres.exe: preprocessing failed.
mingw32-make[2]: *** [OgreMain/OgreWin32Resources.rc.obj] Error 1
mingw32-make[1]: *** [OgreMain/CMakeFiles/OgreMain.dir/all] Error 2
mingw32-make: *** [all] Error 2
mingw32-make[2]: Leaving directory `C:/Users/Conscious Code/Desktop/ogre_src_v1-8-1'
mingw32-make[1]: Leaving directory `C:/Users/Conscious Code/Desktop/ogre_src_v1-8-1'
Process terminated with status 2 (0 minutes, 1 seconds)
1 errors, 0 warnings (0 minutes, 1 seconds)
打造訊息:
=== OGRE, all ===
preprocessing failed.
=== Build finished: 1 errors, 0 warnings (0 minutes, 1 seconds) ===
從錯誤中,似乎比如在生成OgreWin32Resource.rc.obj時遇到一些與windres有關的問題。我能做些什麼來解決這個問題?
請確保您將引號放在路徑名的周圍,否則空格將被解釋爲命令行選項之間的分隔符。 –
由於有關「C:\ Program」的錯誤表明它被「C:\ Program Files文件...」中的空間所困惑,因此工具鏈的某些部分顯然與路徑中的空格不兼容(或者路徑未正確轉義) – Angew
我想出了這個具體問題,並且被其他幾乎不可能的問題(關於哪些問題我不會發布更多問題)所束縛。我會在SO讓我時發佈所有的細節。 –