Revealing my ignorance: Why doesn't a static library project (in Visual Studio in my case) have linker settings in the project properties page? I thought "linking" was kind of a big deal re: libraries, but apparently I fundamentally misunderstand something.
相关问题
- How to know full paths to DLL's from .csproj f
- Importing NuGet references through a local project
- Visual Studio 2019 - error MSB8020: The build tool
- 'System.Threading.ThreadAbortException' in
- VS2017 RC - The following error occurred when tryi
相关文章
- How to show location of errors, references to memb
- How to track MongoDB requests from a console appli
- Visual Studio Hangs on Loading UI Library
- How to use Mercurial from Visual Studio 2010?
- Copy different file to output directory for releas
- Edit & Continue doesn't work
- “Csc.exe” exited with code -1073741819
- Visual Studio: Is there an incremental search for
Linking is a process of combining object files into executables (and dynamic libraries, which have similar to executables format).
Static libraries aren't linked, they are simple archives of object files.
When you reference static library in your project, object files are extracted from library and linked together with files of particular project.
Because you don't link it, pure and simple.
Linking is the act of pulling together all your object files and libraries to create an executable. In a static library project you're not making an executable, you're just creating a library which will later be linked.
For example (and this is UNIX rather than Windows, but the concepts are similar), you would use the compiler
cc
to turn your source files into object files and the archiverar
to turn those into a library. The linker (or linkage editor)ld
does not need to take part until you wanted to go to the next step and include your library into an executable.Making an executable is a three step process:
A library is just a collection of objects, which by definition have not been linked yet. The linker is not used to create the library, so it makes sense that there would be no linker options for it.