0

I've been trying to compile the model loading library Assimp for my project using cmake and then MinGW. However, I don't know how to do that for 64bits which is what I'm using on my project. I used the command "mingw32-make" but if I understand correctly that is for 32bits and when I try to run my project with the obtained DLL it exits without explanation. I've heard this can happen when you try to link 32bit files with a 64bit projects. I heard about "make.exe" but I don't know if it's what I need and either way I can't find it in my MinGW folder. I'd rather not resort to Visual Studio, I use VSCode.

Ian vos
  • 39
  • 5
  • If you followed the VS Code installation instructions to the letter, you'll have MSYS2 installed and can most likely [pull a precompiled version of the library in from pacman](https://packages.msys2.org/package/mingw-w64-x86_64-assimp). – user4581301 Aug 08 '23 at 20:40
  • [Some good reading to help you sort out `make` in MSYS2](https://www.msys2.org/wiki/Porting/#mingw32-make) – user4581301 Aug 08 '23 at 20:42
  • do you by chance mean this website when talking about VSCode: https://code.visualstudio.com/docs/cpp/config-mingw#_prerequisites – Ian vos Aug 08 '23 at 20:48
  • `mingw32-make` can build any kind of applications, since it doesn't do any compiling itself. I second the advice: [install MSYS2](https://stackoverflow.com/q/30069830/2752075), use it to install both a compiler and a prebuilt Assimp, and just use that. – HolyBlackCat Aug 08 '23 at 20:51
  • That would be the one. One of the best things about MSYS2 is the breadth of its library support. You don't have to roll-your-own builds of the common libraries and a lot of uncommon libraries very often. – user4581301 Aug 08 '23 at 20:51
  • It worked! thank you so much! I took the precompiled version and for now it runs on the project. Should I post this as an answer to my question? – Ian vos Aug 09 '23 at 01:06

1 Answers1

0

The solution is simple: just get the latest release, generate the make files for win64 and build it by yourself:

cd <assimp-source>
cmake CMakeLists.txt -G 'MinGW Makefiles'
cmake --build .

If you don't know how your mingw-toolchain cmake generator is called you can check the cmake help for that:

cmake --help

Just check for the MinGW stuff and add the listed name for the cmake -G option.

Hope that helps you a little bit to get around your issues.

KimKulling
  • 2,654
  • 1
  • 15
  • 26