Assimp: Material.inl illegal token on right side of '::

Created on 16 Dec 2018  路  7Comments  路  Source: assimp/assimp

I just got a test project setup and hoped I had Assimp setup and working, but I ran into this error in the Material.inl file in the include dir.

image
image

Line 106.

Most helpful comment

windows.h defines min unless you define NOMINMAX before including it. This breaks all kinds of things in the C++ headers.

thanks this worked for me, I had included the constant NOMINMAX in preprocessor definitions: WIN32;_DEBUG;_CONSOLE;dSINGLE;NOMINMAX;%(PreprocessorDefinitions)

All 7 comments

Hey dude, I'm in the exact same position as you currently. Did you manage to find a solution?

@TriJacob it was a long process but it seemed I just followed the wrong tutorial for setting everything up. I had to spend many hours trying different tutorials and eventually found a setup that worked for my setup. (Windows 10 64-Bit)

I wish I had better help, it was a very painful process.

windows.h defines min unless you define NOMINMAX before including it. This breaks all kinds of things in the C++ headers.

@turol Yo, thanks for the response but I fixed this days ago haha! There was a few solutions but that wasn't one that worked for me. I ended up for a while just encasing the problem in brackets example: (std::min) which worked until I found that I had a dependancy issue that was causing it so it's all sorted now.

Encapsulating std::min in parentheses seemed to do the trick for me.

Windows 10 Pro x64
Visual Studio 2019 Community
Cmake

Thanks a lot for the update.

Which tutorial have you follow?

Kim

windows.h defines min unless you define NOMINMAX before including it. This breaks all kinds of things in the C++ headers.

thanks this worked for me, I had included the constant NOMINMAX in preprocessor definitions: WIN32;_DEBUG;_CONSOLE;dSINGLE;NOMINMAX;%(PreprocessorDefinitions)

Was this page helpful?
0 / 5 - 0 ratings