Search code examples
visual-studio-2010qtqt4qwt

Visual Studio header not found (Qwt)


I would appreciate some help with the following: I'm writing a program in Visual Studio 2010 using the Qt addon, and I needed to plot some data. Consequently, I installed Qwt. The Qwt widgets are avaliable in Qt Designer (so I've done something right!). My problem is, whenever I try to reference Qwt ('include '), Visual Studio tells me that it cannot find the requested header. I've added 'C:\Qwt-6.0.1\lib\' to my 'Path' environment variable. I thought that this would be enough for Visual Studio to see it.

I'm not yet very proficient with Visual Studio. How can I ude the Qwt library in Visual Studio?

I've found that I can use Qwt's libraries in Qt Creator, just by adding 'CONFIG += qwt' to the pro file; however, my created Qt project (created in Visual Studio 2010) does not have a pro file. It has the Visual Studio equivalent.

Thanks.


Solution

  • Adding these paths to your PATH environment variable does nothing.

    For Visual Studio to find the appropriate headers, you will need to tell it explicitly where they are. That is, you will need to add the path to the header files as one of the so called "additional include directories" of your project.

    The same goes for other elements such as library directories, should you be linking against libs. The libraries themselves (their file names) can then be added under the "Additional Dependencies" at Linker >> Input.