0

Error image

Hello! Im kinda new to using libraries and im having some trouble with Assimp. Im currently working on a group school project and we have to link Assimp dynamically, but after following all manner of dynamic linking guides we still can't make it work, all we get is an error saying "Error LNK1136 invalid or corrupt file [File path]".

We've managed to make it work by static linking, but we have to make it work dynamically, and thats whats giving us a headache.

Any insight would be much appriciated, thanks! \o

Alan Birtles
  • 32,622
  • 4
  • 31
  • 60
Fozze
  • 1
  • 1
  • Which IDE are you using? What build configuration? Have you tried redownloading and unpacking assimp? – Botje May 19 '20 at 12:31
  • We are using Visual Studio 2019, our build config is set to debug with x64, platform is set to all platforms. we've tried downloading assimp a few times. We use Cmake to build the files. – Fozze May 19 '20 at 12:39
  • Where did you get that DLL from? The assimp downloads page only hosts source. – Botje May 19 '20 at 12:43
  • We used Cmake to build the library and that generated a lib and the dll file for us. The lib file works fine for static, but the dll doesnt for dynamic. – Fozze May 19 '20 at 12:45
  • You can't link to a dll directly, you need a `.lib` file. – Alan Birtles May 19 '20 at 13:01
  • I saw someone mention having a [name]DLL.lib file for another library that they could use when they linked their library dynamically, but no such dll.lib file is being generated. On Assimps website under dynamic linking they simply say "assimp can be built as DLL. You just need to select a -dll config from the list of project configs and you're fine." which is what we do. We must be missing something. Perhaps i should write to them directly and ask? – Fozze May 19 '20 at 13:05
  • The documentation also says "You can find the LIBs at `assimp/lib` and the DLLs at `bin`". Is it possible the .lib file was in a different directory all along? Also, use [`vcpkg`](https://assimp-docs.readthedocs.io/en/latest/about/introduction.html#build-on-all-platforms-using-vcpkg) or conan if you can, building stuff on Windows is always finicky. – Botje May 19 '20 at 14:48

0 Answers0