Search code examples
c++visual-studio-2010linkerstatic-librariesassimp

Visual Studio 2010 Assimp library won't link


I seem to have a perpetual problem of never being able to get any library to link with Visual Studio. Ever. I eventually get tired of trying and just include the header and source files manually.

My latest endeavour is trying to set up Assimp. I went and downloaded the latest version and followed the installation guide for Visual Studio 2010. http://assimp.sourceforge.net/lib_html/install.html

The result:

LINK : fatal error LNK1104: cannot open file 'assimp--3.0.1270-sdk/lib/assimp_release-dll_x64/assimp.lib'

I set the include directories:

assimp--3.0.1270-sdk/include

I set the library directories:

assimp--3.0.1270-sdk/lib/assimp_release-dll_x64

I set the additional dependencies (the guide includes the directories, but shouldn't I just be able to just put assimp.lib since I included the library directory above?):

assimp--3.0.1270-sdk/lib/assimp_release-dll_x64/assimp.lib

What am I doing wrong?

Also, considering this isn't my first time having these difficulties, are there any good tutorials to help me understand this process a little better? I've tried searching for it but most are for previous versions of VS...


Solution

  • My guess is you should provide explicitly relative or absolute paths for the library directory.

    You're right about the dependency name, assimp.lib is the correct name and the guide is a bit ambiguous here.

    Apart from that, you're doing everything right. Provided the lib file exists, it should link.

    (assimp co-founder writing here)