This topic is 2216 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I've been trying for the past week to implement 3DS static meshes into my OpenGL project, and finally came across lib3ds to help me do the job. I was going with the FBX SDK for a while, but I needed something a little more lightweight and better suited for OpenGL.
And for textures, I decided to go with a mix of Win32 API and SOIL.
Since this is primarily a side project to test these features before adding them to my main project (a standalone, dialog-based plugin DLL with embedded resources), I needed to be sure that everything is statically linked so that no additional dependencies will be neccesary on the user's machine.

So I compiled lib3ds (v1.2.0) as a static lib, then added it to my MFC test app.
Then, I compiled SOIL (VC9 version) as a static lib, and added that as well.

Upon compiling my project, I got several LNK2005 errors in reference to libcmt.lib and msvcrt.lib, so I added those to the list of ignored libraries (Linker -> Input -> Ignore Specific Default Libraries).
But when I do that, I am left with the following output:

 Warning 1 warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification c:\projects\3ds\loader\loader\LINK Error 2 error LNK2001: unresolved external symbol __imp__strstr c:\projects\3ds\loader\loader\soil.lib(SOIL.obj) Error 3 error LNK1120: 1 unresolved externals c:\projects\3ds\loader\Debug\loader.exe 

If I don't link to SOIL, all of these problems go away (except of course that I cannot use SOIL). But why am I getting an error linking to the library when it built into a static library just fine without that same error?

##### Share on other sites
Hrmm, well I recompiled SOIL using Multi-threaded (/MT) instead of Multi-threaded DLL (/MD) and now it seems to work.
Or, at least, I'm not getting any compiler/linker errors in my app. Edited by Rectangle

1. 1
2. 2
Rutin
22
3. 3
4. 4
frob
16
5. 5

• 9
• 33
• 13
• 13
• 10
• ### Forum Statistics

• Total Topics
632580
• Total Posts
3007188

×