开发者

What is the link file limit using Visual Studio's link.exe?

开发者 https://www.devze.com 2023-02-04 20:45 出处:网络
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 containin

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

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

And the linker call becomes:

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

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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消