Click here to Skip to main content
15,880,469 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
I am seeing an error when compiling an old project in VS2010.

Generating Code...
LINK : fatal error LNK1104: cannot open file 'C:\..\..\..\..\..\..\STLPort\STLport-5.2.1\stlport.obj'

What does this error means? The obj file is not present at all. Is this need to be generated? How can I get around this issue?
Posted
Comments
Philippe Mori 7-Aug-13 23:23pm    
If you still have STLPort, you might simply fix includes and libraries paths. Otherwise, you might consider using STL that come with the compiler.

Most likely, it means that his file is not found.

Very basically, the C or C++ build is composed of two types of steps: compilation of source code into object files performed by a compiler, and putting all object files together (with symbol resolution, address translation and other sophisticated tasks) in a single executable code (most usually, *.EXE, *.DLL) performed by a linker.

Some object files or libraries can be external, already provided to you in a previously compiled form. In your case, one of such files is missing. You need to obtain and compile some version of STL library, not necessarily STLport. You can use one bundled with all versions of Visual Studio and C++ compiler. For that purpose, you should just check a corresponding option in the project properties.

Please see:
http://en.wikipedia.org/wiki/Compiler[^],
http://en.wikipedia.org/wiki/Linker[^],
http://en.wikipedia.org/wiki/Standard_Template_Library[^],
http://msdn.microsoft.com/en-us/library/c191tb28%28v=vs.110%29.aspx[^],
http://stdcxx.apache.org/[^],
http://www.stlport.org/[^].

Last three links shown above provide the access to three different implementations of STL. Also, on the Microsoft's page, you will get some overview and the information of the use of the library. This is a standard C++ template library.

—SA
 
Share this answer
 
Comments
mbue 6-Aug-13 14:33pm    
*****: i love standards - everybody has another ;).
Sergey Alexandrovich Kryukov 6-Aug-13 14:36pm    
:-)
I think what this is telling you is that you used to have the project in a different directory and one of the projects had a relative reference to a project (likely called STLPort), and you don't have that library/product installed on your current machine. You can probably figure out where it is by opening the project's .vcxproj file with a text editor such as notepad (ie. not visual studio) and look for the STLPort reference.

In the filename spec, each occurrence of "\.." means "go up one directory level" from "here", where "here" usually means the location of the solution file. When the error complains about "C:\..", there is serious trouble with the file spec.

You probably need to find and install the STLPort product/project and fixup your project's reference(s) to it on your machine. Don't forget to do this for both debug and release configurations.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900