- Installer CMake - Récupérer le code source de Assimp (et le mettre dans un répertoire en dehors de MinGW) - En ligne de commande, dans le répertoire de assimp:
Voilà comme ça tu auras une installation propre d'une version Release de Assimp (bon ce sera installé dans le répertoire de MinGW, et c'est mal comme je t'ai dit, mais ça reste conforme à la philo que tu as commencé à suivre).
Tu dois ajouter le répertoire bin de CMake dans ta variable d'environnement PATH (recherche "Modifier les variables d'environnement" sous Windows). Il te le propose à l'installation, mais tu ne l'as pas coché j'imagine, donc tu dois le faire à la main.
Comment ça? Tu as compilé Assimp? Les headers, les binaires ont bien été installés là où tu voulais? Maintenant tu peux aller voir dans ton projet s'il trouve bien les headers et la librairie d'import quand tu compiles / link.
Comme tu as installé ça à la sauvage dans MinGW, j'imagine que ça va fonctionner tout seul, sinon suivant le système de build (je crains la réponse Code Blocks), il faut le configurer pour qu'il trouver les répertoires d'include, les répertoires des librairies, et le nom des librairies.
unable to invoke the cl compiler. To fix this problem, run cmake from the Visual Studio Command Prompt (vcvarsall.bat).
Tell CMake where to find the compiler by setting either the environment variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.
CMake Error at CMakeLists.txt:54 (PROJECT): The CMAKE_CXX_COMPILER:
cl
is not a full path and was not found in the PATH.
To use the NMake generator with Visual C++, cmake must be run from a shell that can use the compiler cl from the command line. This environment is unable to invoke the cl compiler. To fix this problem, run cmake from the Visual Studio Command Prompt (vcvarsall.bat).
Tell CMake where to find the compiler by setting either the environment variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred! See also "C:/Users/Hubert/Downloads/assimp-5.0.1/build/CMakeFiles/CMakeOutput.log". See also "C:/Users/Hubert/Downloads/assimp-5.0.1/build/CMakeFiles/CMakeError.log".
C'est mal car tu pollues ton installation MinGW avec une librairie externe. De plus il existe une infinité de manière de compiler une librairie (release/debug, statique, partagée, différents niveaux d'optimisation du linker ou du compilateur, options intrinsèques à la librairie, ciblage particulier d'une architecture etc), comment faire en sorte de switcher facilement de l'une à l'autre si tout est mélangé dans le même répertoire?
Les undefined reference de l'éditeur de liens viennent du fait que ton projet n'est pas bien configuré, il faut lui indiquer le nom de la librairie d'import d'Assimp (installée dans le répertoire lib), et éventuellement le répertoire où elle se trouve.
J'ai fait quelques recherches et les .dll devraient être dans "build/code/lib".
Mais je n'ai pas le dossier lib.
Et j'ai eu une erreur sur CMake.
PS : J'ai utilisé l'application CMake (cmake-gui.exe) à l'aide de ce site : https://sites.google.com/site/gsucomputergraphics/educational/set-up-opengl?tmpl=%2Fsystem%2Fapp%2Ftemplates%2Fprint%2F&showPrintDialog=1
Ben, le fait que le sous "dossier de base" s'appelle "build" devrait déjà te faire penser au fait qu'il faut compiler toi même tout le projet avant de pouvoir l'utiliser
Ce qui se conçoit bien s'énonce clairement. Et les mots pour le dire viennent aisément.Mon nouveau livre : Coder efficacement - Bonnes pratiques et erreurs à éviter (en C++)Avant de faire ce que tu ne pourras défaire, penses à tout ce que tu ne pourras plus faire une fois que tu l'auras fait
Could not determine Eclipse version, assuming at least 3.6 (Helios). Adjust CMAKE_ECLIPSE_VERSION if this is wrong.
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working C compiler: C:/MinGW/mingw64/bin/gcc.exe - skipped
Detecting C compile features
Detecting C compile features - done
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Check for working CXX compiler: C:/MinGW/mingw64/bin/g++.exe - skipped
Detecting CXX compile features
Detecting CXX compile features - done
Shared libraries enabled
Looking for DirectX...
DirectX_PREFIX_PATH changed.
Could not locate DirectX
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.
Looking for sys/types.h
Looking for sys/types.h - found
Looking for stdint.h
Looking for stdint.h - found
Looking for stddef.h
Looking for stddef.h - found
Check size of off64_t
Check size of off64_t - done
Looking for fseeko
Looking for fseeko - found
Looking for unistd.h
Looking for unistd.h - found
CMake Warning (dev) at C:/Users/Hubert/Downloads/cmake-3.20.1-windows-x86_64/share/cmake-3.20/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.
Could NOT find rt (missing: RT_LIBRARY)
INFO Hunter enabled or RT-extension not found. glTF import/export will be built without Open3DGC-compression.
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
CMake Deprecation Warning at tools/assimp_cmd/CMakeLists.txt:40 (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.
PS : J'ai comme IDE Eclipse avec MinGW 64 bits 8.1.0. J'ai téléchargé la version .zip de CMake. J'ai ensuite exécuté cmake-gui.exe, j'ai entré dans "Where is the source code" mon dossier Assimp, puis dans "Where to build the binaries" dans le dossize "build" de Assimp. Ensuite, je clique sur "Configure" et là, je bloque... Je dois choisir quoi comme "generator for this project" ?
Quelles sont les vraies erreurs? Ca c'est le message d'erreur générique à la fin du build pour dire que l'éditeur de liens est sorti en erreur, mais il y a forcément des erreurs avant et ce sont celles la qui sont importantes.
CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles". CMAKE_MAKE_PROGRAM is not set . You probably need to select a different build tool. CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles". CMAKE_MAKE_PROGRAM is not set . You probably need to select a different build tool. CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage -- Configuring incomplete, errors occurred!
Ajoute le répertoire bin de MinGW dans ton PATH si ça ne fonctionne toujours pas.
Si la compilation est trop lente, tu peux ajouter l'option -j <nombre de theads>. Contrairement à Ninja, c'est pas automatique pour make.
Exemple:
cmake --build . -j 8 --config Release
- Edité par SpaceIn 6 avril 2021 à 14:05:42
Je m'autocite. Tu as fait ce que j'ai mis en gras? CMake n'arrive pas à trouver mingw32-make.exe j'imagine, qui doit se trouver... dans ton répertoire bin de MinGW.
× Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
× Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.
Si vous ne trouvez plus rien, cherchez autre chose.
Si vous ne trouvez plus rien, cherchez autre chose.