38

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?

Ori Nachum
  • 588
  • 3
  • 19
user346443
  • 4,672
  • 15
  • 57
  • 80
  • Similar question: [DLL References in Visual C++](http://stackoverflow.com/questions/809948/dll-references-in-visual-c) – Devendra D. Chavan Mar 08 '11 at 15:59
  • Similar question: [How do I reference one VC++ project from another in the same project?](http://stackoverflow.com/questions/1201959/how-do-i-reference-one-vc-project-from-another-in-the-same-project) – Devendra D. Chavan Mar 08 '11 at 16:00
  • Ive added the library directory to visual studio. My problem is i cant add the library as the option: Configuration Properties->Linker->Input Is not visible. – user346443 Mar 08 '11 at 16:03
  • 1
    Normally i go to: Project Properties / Configuration Properties / Linker / Input / Additional Dependencies. But the linker option isn't visible – user346443 Mar 08 '11 at 16:05
  • Did you get your answer? I am having the same issue. project is C# https://stackoverflow.com/questions/72569189/i-dont-have-the-linker-option-in-visual-studio-2013-how-to-enable-it – Prageeth Liyanage Jun 10 '22 at 05:11

7 Answers7

48

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

edward king
  • 597
  • 4
  • 3
28

You are looking at the properties for the Solution.

You'll need to open the properties for the specific project within that solution.

Michael Burr
  • 333,147
  • 50
  • 533
  • 760
19

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.

Community
  • 1
  • 1
Tobias
  • 4,034
  • 1
  • 28
  • 35
9

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.

AmitB
  • 724
  • 8
  • 5
4

If the Configuration Type (Configuration Properties -> General -> Configuration Type) is set to Utility, then no linker option will be available.

Kevin
  • 8,312
  • 4
  • 27
  • 31
3

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.

Toon Krijthe
  • 52,876
  • 38
  • 145
  • 202
0

Try to run Visual Studio as an administrator. This works for me.

Radwa Ahmed
  • 131
  • 1
  • 1
  • 9