I am triing to build Assimp with CodeBlocks and MINGW as static lib. Have downloaded the latest avaible version (5.0.1) and created a makefile for CodeBlocks using cmake-gui. I am able to open that file with CodeBlocks, but when I am triing to build iit fails. Here the complete log:
-------------- Build: all in Assimp (compiler: GNU GCC Compiler)---------------
Checking if target is up-to-date: mingw32-make.exe -q -f Makefile all
Running command: C:/PROGRA~2/CODEBL~1/MinGW/bin/mingw32-make.exe -f "C:/Users/.../assimp-5.0.1/build/Makefile" VERBOSE=1 all
"C:\Users\...\cmake-3.22.1-windows-i386\bin\cmake.exe" -S"C:\Users\...\assimp-5.0.1" -B"C:\Users\...\assimp-5.0.1\build" --check-build-system CMakeFiles\Makefile.cmake 0
Re-run cmake file: Makefile older than: C:/Users/.../cmake-3.22.1-windows-i386/share/cmake-3.22/Modules/CMakeCInformation.cmake
-- Shared libraries disabled
-- Looking for DirectX...
-- DirectX_PREFIX_PATH changed.
-- Found DirectX: C:/Program Files (x86)/CodeBlocks/MinGW/lib/libd3d9.a
-- DX lib dir: C:/Program Files (x86)/CodeBlocks/MinGW/lib
-- Looking for ZLIB...
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could not locate ZLIB
-- compiling zlib from sources
CMake Deprecation Warning at contrib/zlib/CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
CMake Warning (dev) at C:/Users/.../cmake-3.22.1-windows-i386/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to `find_package_handle_standard_args` (rt) does
not match the name of the calling package (RT). This can lead to problems
in calling code that expects `find_package` result variables (e.g.,
`_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
cmake-modules/FindRT.cmake:19 (find_package_handle_standard_args)
code/CMakeLists.txt:1013 (FIND_PACKAGE)
This warning is for project developers. Use -Wno-dev to suppress it.
INFO Hunter enabled or RT-extension not found. glTF import/export will be built without Open3DGC-compression.
-- Could NOT find rt (missing: RT_LIBRARY)
-- Enabled importer formats: AMF 3DS AC ASE ASSBIN B3D BVH COLLADA DXF CSM HMP IRRMESH IRR LWO LWS MD2 MD3 MD5 MDC MDL NFF NDO OFF OBJ OGRE OPENGEX PLY MS3D COB BLEND IFC XGL FBX Q3D Q3BSP RAW SIB SMD STL TERRAGEN 3D X X3D GLTF 3MF MMD STEP
-- Disabled importer formats:
-- Enabled exporter formats: 3DS ASSBIN ASSXML COLLADA OBJ OPENGEX PLY FBX STL X X3D GLTF 3MF ASSJSON STEP
-- Disabled exporter formats:
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/.../assimp-5.0.1/build
"C:\Users\...\cmake-3.22.1-windows-i386\bin\cmake.exe" -E cmake_progress_start "C:\Users\...\assimp-5.0.1\build\CMakeFiles" "C:\Users\...\assimp-5.0.1\build\\CMakeFiles\progress.marks"
C:/PROGRA~2/CODEBL~1/MinGW/bin/mingw32-make.exe -f CMakeFiles\Makefile2 all
mingw32-make.exe[1]: Entering directory 'C:/Users/.../assimp-5.0.1/build'
C:/PROGRA~2/CODEBL~1/MinGW/bin/mingw32-make.exe -f contrib\zlib\CMakeFiles\zlib.dir\build.make contrib/zlib/CMakeFiles/zlib.dir/depend
mingw32-make.exe[2]: Entering directory 'C:/Users/.../assimp-5.0.1/build'
[ 1%] Generating zlib1rc.obj
cd /d C:\Users\...\ASSIMP~1.1\build\contrib\zlib && "C:\Program Files (x86)\CodeBlocks\MinGW\bin\windres.exe" -D GCC_WINDRES -I "C:/Users/.../assimp-5.0.1/contrib/zlib" -I "C:/Users/.../assimp-5.0.1/build/contrib/zlib" -o "C:/Users/.../assimp-5.0.1/build/contrib/zlib/zlib1rc.obj" -i "C:/Users/.../assimp-5.0.1/contrib/zlib/win32/zlib1.rc"
Der Befehl "C:\Program" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
C:\Program Files (x86)\CodeBlocks\MinGW\bin\windres.exe: preprocessing failed.
mingw32-make.exe[2]: *** [contrib/zlib/zlib1rc.obj] Error 1
mingw32-make.exe[1]: *** [contrib/zlib/CMakeFiles/zlib.dir/all] Error 2
mingw32-make.exe: *** [all] Error 2
contrib\zlib\CMakeFiles\zlib.dir\build.make:72: recipe for target 'contrib/zlib/zlib1rc.obj' failed
mingw32-make.exe[2]: Leaving directory 'C:/Users/.../assimp-5.0.1/build'
CMakeFiles\Makefile2:176: recipe for target 'contrib/zlib/CMakeFiles/zlib.dir/all' failed
mingw32-make.exe[1]: Leaving directory 'C:/Users/.../assimp-5.0.1/build'
C:/Users/.../assimp-5.0.1/build/Makefile:134: recipe for target 'all' failed
Process terminated with status 2 (0 minute(s), 11 second(s))
4 error(s), 0 warning(s) (0 minute(s), 11 second(s))
I am not really familiar with al that build stuf, but looks like there is some problem with zlib. How can I fix that problem and build the lib with the compiler I have? Don´t want to switch to msys2 or any other compiler. However if there is no way to compile it with MINGW, I am ready to switch to some other C++ API with the same features.
There is 1 line in that log which is alway in the language of the OS:
Der Befehl "C:\Program" ist entweder falsch geschrieben oder konnte nicht gefunden werden.
The translation is:
The command "C: \ Program" is either misspelled or could not be found