title: How to integrate PC-lint with Visual C++ 2008
body: <p>My company has the PC-lint executable lint-nt.exe.</p>
  
  <p>I am trying to use this to integrate PC-lint with MS Visual Studio 2008 to analyze <em>.c/</em>.cpp sources. But I have no success with getting that to work.</p>
  
  <p>I read: </p>
  
  <p><a href="http://www.gimpel.com/html/pub80/env-vc9.lnt" rel="nofollow">http://www.gimpel.com/html/pub80/env-vc9.lnt</a></p>
  
  <p>and similar such info on one or two other sites, but no success.</p>
  
  <p>I followed the indicated steps to add an external tool in Visual C++ 8, but when I click on the newly added tool, the pc-lint window opens momentarily and is closed immediately, and I doubt it has run any analysis. So its not working for me.</p>
  
  <p>Then I tried running lint-nt.exe on a windows command prompt as</p>
  
  <p><code>lint-nt.exe +fce +fcp +cpp(cpp,cxx,cc) -i"C:\Program Files\Microsoft Visual Studio 9.0\VC\include" +libdir +libh  myfile.cpp</code></p>
  
  <p>It did perform the analysis but it analyzed a lot of header files from the Visual C++ INCLUDE folder (limits.h sal.h iostream etc..), because my source file had <code>#include &lt;iostream&gt;</code> and so on.</p>
  
  <p>EDIT: I see pc-lint has options <code>+/-libdir</code>, <code>+/-libh</code> and such options, which might help, but I just could not use them correctly to avoid the analysis of compiler headers.</p>
  
  <p>Two questions:</p>
  
  <ol>
  <li>How do I prevent pc-lint from analyzing the compiler header files
  and only analyze my source code files?</li>
  <li>How to integrate pc-lint into
  Visual C++ 2008 Express edition, which I am using?</li>
  </ol>