79292566

Date: 2024-12-18 21:46:22
Score: 1
Natty:
Report link

Pardon my necropost. Incase anyone is using C and need's ASSIMP just like I did. You can build ASSIMP with CMake inside 'build' directory. Create the 'build' directory yourself.

I used Ninja build system (I prefer this)

Do this inside of your ASSIMP directory

  1. mkdir build
  2. cd build
  3. cmake -G "Ninja" ..
  4. ninja

Inside the build/bin you should see a lib-assimp5.dll file this you will need! Drag this .dll file into your build directory where your executable is located.

Go to your CMakeLists.txt and target_link_libraries({$PROJECT_SOURCE_DIR}path/to/lib-assimp5.dll)

There you go if you did everything correct ASSIMP should work!

Also not to mention check out assimp/include/defs.h defs.h: Contains definitions for C types

for example this line: const struct aiScene * should be written like this

const C_STRUCT aiScene * = (const C_STRUCT aiScene *)aiImportFile(); The explicit cast is optional but more cleaner to read.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Christopher DelVecchio