Sign in to follow this  
Numsgil

Upgrading from MSVC 6 to MSStudio 2005 error

Recommended Posts

I'm trying to compile my MSVC 6 project in Studio 2005. I fixed everything up to the point I get this linker error: Linking... LINK : fatal error LNK1104: cannot open file 'stlport_vc6_static.lib' Obviously my MSVC 6 project was using stlport. But how does Studio know that? It's a fresh studio install. Stlport isn't referenced anywhere in my project (I did a search for "stlport" in my workspace and source directory to be sure). I assume the stlport include files tell the linker to link with stlport, so if I'm not linking to any stlport include files (haven't added them to the studio include or lib directories) why is it thinking it needs the stlport library? The obvious answer is to figure out stlport for Studio, but I'd like to know why this error is happening so I know how to fix it should it crop up in the future.

Share this post


Link to post
Share on other sites
If you didn't use #pragma comment( lib, "...lib" ) in the source-code then it has to be from the project file and got imported to the vcproj-file.

Otherwise Visual Studio could not have any idea that it needs that stlport library.

If you used the basic windows search to find it you may have fallen for the default indexing setting in XP: By default a lot of extensions are NOT searched. You have to enable that setting first (it's hidden in the indexing service; even when you've disabled indexing, the setting will affect your search results).

Share this post


Link to post
Share on other sites
Maybe your visual studio 2005 install took the include paths
from visual studio 6 (so it's still pointing at your stlport
directory which will then automatically include stlport_???.lib
which it can't find because you only have an stlport built with
vc6)?

Share this post


Link to post
Share on other sites
How would I check for something like that? I know it's stlport isn't listed anywhere in the include or lib directories you usually need to set up for 3rd party libraries.

Share this post


Link to post
Share on other sites
You DID clean the project, including deleting all the .objs, right?

Share this post


Link to post
Share on other sites
I clicked "clean". I haven't actually physically looked if there are intermediate build files still floating around. Let me try that.

Share this post


Link to post
Share on other sites
Oh, BTW.. all the .libs that your project is using are fair game, too. If one of them wants STLPort, it'll cause that error.

Share this post


Link to post
Share on other sites
It might be one of the libraries I have that you have to build from source before you can use. I didn't think about that. Let me try recompiling it with Studio.

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