Sign in to follow this  
rgibson11

Linking Assimp

Recommended Posts

Hi I am having trouble linking the assimp lib, I have spent now 3 hours trying to get it running, I am using windows 7 and visual studio 2010 beta 2. in one case it builds sucessfully a lib which is 140mb in size. I tried to link that under /MT, gives me a bunch of linker errors. in another case I compiled a a dll file and a lib which are both around 200kb in size, tried linking that under /MD also a lot of linker errors, lib is linked, dll is in correct folder. Is it even possible to build it with vs 2010? It would be amazing if someone could send me the compiled lib in pm. thanks

Share this post


Link to post
Share on other sites
You can of course use it with Visual Studio 2010. It's just that the pre-built libraries that come with the binary package are most probably not linkable with VS2010. I suggest fetching the most recent source codes via Subversion and then just copy the whole directory into your solution's directory and add its vcproj to your solution via the "Add existing project" context menu entry.

You then maybe have to adapt the runtime so that it matches the runtime of your main application, and maybe check a box in the dependency manager to tell VS that your application depends on that project. But I think you're simply done, then. Just recompile and it should build Assimp and link to it automatically.

Share this post


Link to post
Share on other sites
Thanks for replies,

I didnt post the errors before because they were just the standard errors that you get when a lib is missing, like it cant find the definition of a function.

I tried Schrompf method and it did seem to do something, it built the Assimp project (but no .lib output) that I added but now it says:


C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(1095,5): warning MSB8012: TargetPath(C:\Users\DEV\Desktop\Test\Test\Assimp\workspaces\vc9\./../../lib/assimp_release_Win32\assimp.lib) does not match the Library's OutputFile property value (). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Lib.OutputFile).
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(1096,5): warning MSB8012: TargetExt(.lib) does not match the Library's OutputFile property value (). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Lib.OutputFile).
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(1097,5): warning MSB8012: TargetName(assimp) does not match the Library's OutputFile property value (). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Lib.OutputFile).


I am sorry I dont know what you mean by adapt the runtime of the main application.

Share this post


Link to post
Share on other sites
Ok I managed to make it work, after trying many different project settings. Now the .lib is 95.7mb large/

Build succeeded.

Time Elapsed 00:01:51.64

Thats the time it took to compile my game project with static lib linked, not the .lib project.
Is this normal?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this