Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

boost .ipp file support in visual studio

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

In a C++ project there are few .ipp etensions files. While compiling in visual C++ 2008, i see some linker errors "LNK2019: unresolved external symbol". I figured, for some object file linker was not able to link few function which were implemented under .ipp file. I included .ipp files under project (earlier they were not) but still the same issue.

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

EDIT 1: I found this link that supposedly should provide a workaround to make *.ipp work for visual C++. But, i am using Visual C++ 2008 and see registry path do not have "Languages\File Extensions" field as what this link says.

like image 823
HokageSama Avatar asked Dec 26 '22 17:12

HokageSama


2 Answers

I know this is old, but it still shows up in search results.

The solution for this is

  1. To open the options screen
  2. Search for 'file extension' in the search field
  3. Type "ipp" (no quotes) in the extension field
  4. Select "Visual C++" as the editor
  5. Click Add, then Ok
  6. Close and reopen any open ipp files

You'll get C++ syntax highlighting.

like image 116
C. Waters Avatar answered Jan 05 '23 18:01

C. Waters


If the *.ipp is a header file, you don't need to include it into the project -- just add the appropriate #include directive, where needed.

If it's a translation unit, i.e. you want to compile it, then add it to the project, right-click on it, in the property page go to "General", set "Item type" to be "C/C++ compiler".

like image 35
Igor R. Avatar answered Jan 05 '23 18:01

Igor R.