0

I have a dll project that I'm trying to reference into another project. I followed this example or this one, and though I don't get any intellisense error, when I compile I get

fatal error C1083: Cannot open include file: 'library.h': No such file or directory

So what I did was to add the folder where the lib/dll are located to

Linker / General / Additional Library Directories 

tried also with Configuration Properties / VC++ Directories / Library Directories

and added the lib file name to

Linker / Input / Additional Dependencies

Included as #include < library.h >

Community
  • 1
  • 1
K-RAD
  • 505
  • 6
  • 11
  • How about additional include directories? This is not a linker problem. – drescherjm Sep 18 '14 at 12:55
  • ***I don't get any intellisense error*** Intellisense is not 100% reliable at detecting errors. Trust the compiler output over Intellisense. – drescherjm Sep 18 '14 at 12:57
  • added the folder path to C/C++ / General / Additional Include Directories with the same result – K-RAD Sep 18 '14 at 12:59
  • ***added the folder path*** Was that the exact folder containing `library.h`? If the path had spaces in it did you quote the path? – drescherjm Sep 18 '14 at 13:01
  • it was the folder containing the lib and dll. doesn't have any spaces, but it is in a totally different location than my current project. do i need to move them? – K-RAD Sep 18 '14 at 13:02
  • That is probably the wrong path. The correct path must contain `library.h`. And you have to quote it if there are spaces in the path. – drescherjm Sep 18 '14 at 13:02
  • do the projects need to be in the same solution? – K-RAD Sep 18 '14 at 13:04
  • No they do not need to be in the same solution. – drescherjm Sep 18 '14 at 13:04

0 Answers0