0

I have a static library with .lib extension. Now, I want to link this library to a class library project in Microsoft Visual Studio 10 and use the functions in my class library project. I add the path of .lib file to my class library project by using properties->linker-> additional library directories, but still I can't include the headers in .lib file. It says "No such a file or directory..." So, how can I solve this problem? Thanks in advance...

Enes Altuncu
  • 449
  • 2
  • 7
  • 14

1 Answers1

0

This error is a compilation error. You need to include the .h file in Properties->C\C++->General->Aditional include directories. After that compilation will pass but you will have a linking error. For that you will go to the option properties->linker-> additional library directories and you will specify a folder with libraries. Then go to properties->Linker->Input->Additional dependencies and there specify the .lib file you want from that folder. In there you can also add abosulte path without adding to the other option i think. Dont know why they have two places for that...

k_kaz
  • 596
  • 1
  • 9
  • 20
  • You need to include the .h file first in properties->C/C++->General->additional include directories – k_kaz Aug 01 '16 at 07:03