Visual Studio .ipp file support

{NOTE}: Visual Studio Dos support in the .ipp file. The problem here is more likely manual inefficiency than technical.

There are several .ip files in a C ++ project. When compiling in Visual C ++ 2008, I see some linker errors "LNK2019: unresolved external symbol" . I figured that for some object file linker it was not possible to link several functions that were implemented in the .ipp file. I included .ipp files in the project (before they were not), but still the same problem.

My question is: does visual C ++ 2008 not support .ipp file? If he does the right way to resolve these linker errors.

EDIT 1: I found this link, which supposedly should provide a workaround for working * .ipp for visual C ++. But I use Visual C ++ 2008 and I see that there is no "Languages ​​\ File Extensions" field in the registry path, as this link says.

+4
source share
2 answers

If *.ipp is a header file, you do not need to include it in the project - just add the appropriate #include directive if necessary.

If it is a translation unit, that is, you want to compile it, then add it to the project, right-click it, on the properties page go to the "General" section, set the "Element Type" to "C / C ++ Compiler".

+3
source

I know this is old, but it still appears in the search results.

Solution for this

  • To open the options screen
  • Search for file extension in search field
  • Type "ipp" (without quotes) in the extension field
  • Select "Visual C ++" as Editor
  • Click Add, then OK.
  • Close and open all open ipp files

You will get C ++ syntax highlighting.

+2
source

Source: https://habr.com/ru/post/1433998/


All Articles