LINK:致命错误LNK1104:无法打开文件'C:\..\..\..\..\..\..\STLPort \STLport-5.2.1 \stlport。 OBJ” [英] LINK : fatal error LNK1104: cannot open file 'C:\..\..\..\..\..\..\STLPort\STLport-5.2.1\stlport.obj'

查看:128
本文介绍了LINK:致命错误LNK1104:无法打开文件'C:\..\..\..\..\..\..\STLPort \STLport-5.2.1 \stlport。 OBJ”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在VS2010中编译旧项目时看到错误。



生成代码...

链接:致命错误LNK1104:无法打开文件'C:\..\..\..\..\..\..\STLPort \STLport-5.2.1 \ stlport.obj'



这个错误是什么意思? obj文件根本不存在。这是否需要生成?我怎样才能解决这个问题?

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?

推荐答案

很可能,这意味着找不到他的文件。



基本上,C或C ++构建由两种类型的步骤组成:将源代码编译到由编译器执行的目标文件中,并将所有目标文件放在一起(使用符号解析,地址)单个可执行代码(最常见的是* .EXE,* .DLL)由链接器执行



某些目标文件或库可以是外部的,已经以先前编译的形式提供给您。在您的情况下,缺少其中一个这样的文件。您需要获取并编译某些版本的STL库,而不一定是STLport。您可以使用与所有版本的Visual Studio和C ++编译器捆绑在一起的一个。为此,您只需检查项目属性中的相应选项。



请参阅:

http://en.wikipedia.org/wiki/Compiler [ ^ ],

http:/ /en.wikipedia.org/wiki/Linker [ ^ ],

http://en.wikipedia.org/wiki/Standard_Template_Library [< a href =http://en.wikipedia.org/wiki/Standard_Template_Librarytarget =_ blanktitle =New Window> ^ ],

http://msdn.microsoft.com/en-us/library/c191tb28%28v=vs .110%29.aspx [ ^ ],

http://stdcxx.apache.org/ [ ^ ],

http://www.stlport.org/ [ ^ ]。



上面显示的最后三个链接提供对三种不同STL实现的访问。此外,在Microsoft的页面上,您将获得一些概述和库的使用信息。这是一个标准的C ++模板库。



-SA
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


我认为这是在说什么您以前曾将项目放在不同的目录中,其中一个项目具有项目的相对引用(可能称为STLPort),并且您当前的计算机上没有安装该库/产品。您可以通过使用文本编辑器(例如notepad)打开项目的.vcxproj文件来找出它的位置,并查找STLPort参考。



在文件名规范中,每次出现的\ ..表示从here上升一个目录级别,其中here通常表示解决方案文件的位置。当错误抱怨C:\ ..时,文件规范存在严重问题。



您可能需要查找并安装STLPort产品/在您的机器上项目并修复项目的参考。不要忘记为调试和发布配置执行此操作。
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.


这篇关于LINK:致命错误LNK1104:无法打开文件'C:\..\..\..\..\..\..\STLPort \STLport-5.2.1 \stlport。 OBJ”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆