使用Visual Studio的link.exe的链接文件限制是什么? [英] What is the link file limit using Visual Studio's link.exe?

查看:173
本文介绍了使用Visual Studio的link.exe的链接文件限制是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道某些链接器对命令行上允许的目标文件数有限制.什么是Visual Studio?另外,如果您超过此数目,则某些链接器允许您指定一个包含所有目标文件名称的文件,并且您只能将其作为参数传递.这是一个示例,向您展示我的意思:

I know some linkers have a limit of how many object files are allowed on the command line. What is Visual Studio's? Also, if you exceed this number, some linkers allow you to specify a file containing the name of all the object files, and you would only pass that as an argument. Here's an example to show you what I mean:

some_linker file1.o file2.o ... file9000.o -out=some.lib

假设9000对于此链接器来说太大了,但是它允许您将指向对象的路径写入另一个文件example.txt:

Suppose 9000 is too much for this linker, but it allows you to write the path to the objects in another file, example.txt:

file1.o
file2.o
...
file9000.o

链接器调用变为:

some_linker -input=example.txt -out=some.lib

在这种情况下,Visual Studio的行为如何?它允许这样的事情吗?

How is Visual Studio behaving in this situation? Does it allow for something like this?

推荐答案

The maximum number of arguments doesn't appear to be specified in that portion of the documentation. I'm not sure if this is provided elsewhere, but I personally haven't seen it.

但是,link.exe 确实允许您指定一个文本文件,其中包含所有目标文件的名称,该文件称为命令文件".根据文档,您可以通过在命令文件名前添加以下命令来指定命令文件一个at符号:

However, link.exe does allow you to specify a text file containing the name of all the object files, which it calls a "command file". According to the documentation, you specify a command file by prepending its filename with an at sign:

LINK @commandfile

命令文件中的参数可以用空格或制表符(如在命令行上)和换行符分隔.

The arguments in the command file can be separated by either spaces or tabs (as on the command line) and by newline characters.

这篇关于使用Visual Studio的link.exe的链接文件限制是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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