views:

612

answers:

2

I am using a library that has headers without the .h
This defeats visual studio's intellisense (declaration/definition lookup)

Anyone know how to tell VS2008 that a file is a header?

A: 

I'd hazard a guess that you should ensure the headers are included from a source file (usually a .cpp file).

Where the properties for the source file have the Tool property set to C/C++ Compiler Tool. I would guess Intellisense starts with them, and would follow #includes to files regardless of their extension to build its database of symbols from anything it encounters.

Scott Langham
The preprocessor handles thme fine (the #include command doesn't care) the problem is that the intelisense does it's own parsing and doesn't know they are headers.
Martin Beckett
+4  A: 

Go to Tools::Options::Text Editor::File Extension tab in Visual Studio. Check the "Map extensionless headers" checkbox, and select the language you want from the combobox.

Brian Stewart
Excellent thanks very much, I knew there was an option somehwere - but in the text editor settings ?????
Martin Beckett