How do you build Assimp with MinGW?

Started by
-1 comments, last by Hepple 9 years, 3 months ago

I am trying to build the Open Asset Import Library (Assimp) but I have been running into problems. The assimp documentation is really poor and expects you to know exactly what you are doing and the developers haven't been particularly helpful either. I am hoping someone here has successfully built assimp and can let me know where I am going wrong. I suspect that I have several problems that are contributing to my failure. I am using 64 bit Windows 8.1 pro and using MinGW version 4.8.1.

The first thing I tried was downloading assimp 3.1.1 and boost 1.57. I extracted both folders and tried to use cMake to generate the makefile for MinGW. I haven't used cMake before and the assimp instructions are use cMake as you normally would, so I have no idea if I configured it right. I pointed BOOST_ROOT to the boost folder I extracted from the download, set it to build static libraries and generated the makefile.

I then tried running the makefile and got a number of errors. The first was that IFCReaderGen.cpp.obj: too many sections and was too big. After some googling I found a workaround was to set CMAKE_BUILD_TYPE to release. That seemed to work and it finished the build but I only got the files assimp32.dll and libassimp.dll.a which I thought was odd because I was expecting lib/relese/libassimp.a to be generated as per the details on the assimp website (but I also thought it could be that the website is out of date and wrong).

I linked with -lassimp.dll and that allowed me to build my program. However it crashed upon start-up. I guessed that this was a dll problem - which was odd because I had (tried) to build the static libraries through cMake. I copied assimp32.dll into my executable folder, this time the program wouldn't crash but the screen would be blank. I'm guessing that there was something wrong with the library I build that was causing it to link incorrectly.

At this point I deleted everything to try a fresh start. I found this article http://www.gamedev.net/topic/652898-compile-assimp-on-windows-with-mingw/ which I have been trying to follow:

I downloaded assimp 3.1.1 and boost 1.57 and extracted them.

I opened cmd and changed to the boost root directory and ran "bootstrap.bat mingw"

I then ran "b2 --build-dir="C:/Libraries/boost/" variant=release link=static address-model=32 toolset=gcc", the result of this was 598 targets updates, 3 targets skipped, 2 targets failed. I now have a folder "C:\Libraries\boost\boost\bin.v2" which has two folders "libs" and "standalone", but I'm not certain what my BOOST_ROOT directory is anymore.

I opened cMake, selected the assimp folder I had extracted and configured the following:

BOOST_ROOT = "C:/Libraries/boost/boost/"

ASSIMP_BUILD_STATIC_LIB = TRUE

ASSIMP_BUILD_TESTS = FALSE

ASSIMP_ENABLE_BOOST_WORKAROUND = FALSE

BUILD_SHARED_LIBS = FALSE

I then pressed configure and got the error that the boost libraries were not found.

I'm only guessing what these cMake settings do as I can't find any documentation for assimp. What I'd like to do is build some version of assimp that I can then link to and use in a simple test program. At some point I will go back and build the shared libraries but first I just want to get something working and understand how to do it again. Is there someone who has built assimp with MinGW who can see where I have gone wrong and can instruct me on how to build assimp?

This topic is closed to new replies.

Advertisement