Reputation: 4852
I'm trying to add a library to a Visual Studio C++ project, however, when I go to project properties I only have options for,
Common Properties
Startup Project
Project Dependencies
Debug Source File
Configuration Properites
Configuration
Why can't I see the linker options?
Upvotes: 43
Views: 93435
Reputation: 301
Try to run Visual Studio as an administrator. This works for me.
Upvotes: 0
Reputation: 752
In Visual Studio 2013:
Go to: Project Properties -> Configuration Manager -> General. There, under Project Defaults, change the Configuration Type to either Dynamic Library or Application. Click on Apply. Then you should see the Linker tab added to the menu on the left.
Upvotes: 10
Reputation: 8902
If the Configuration Type (Configuration Properties -> General -> Configuration Type) is set to Utility, then no linker option will be available.
Upvotes: 4
Reputation: 607
Updating answer for VS2012 to cover executable and libraries.
If your project is an executable then you need to navigate as such: Myproject --> properties --> linker --> additional dependencies and add the dll or lib.
If you project is a library, there is no "linker" tab so you need to navigate as such: Myproject -->properties --> Librarian --> additional dependencies and add the dll or lib
Upvotes: 49
Reputation: 4074
Are you by any chance looking at a library project? Quoted from this answer:
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.
Upvotes: 20
Reputation: 39
Either you are looking at the "solution" level or at a file level (e.g. main.cpp). Move to project level and you will see the Linker.
Upvotes: 3
Reputation: 340208
You are looking at the properties for the Solution.
You'll need to open the properties for the specific project within that solution.
Upvotes: 32