openFrameworks icon indicating copy to clipboard operation
openFrameworks copied to clipboard

Proper support for natvis files in addons

Open Scylardor opened this issue 8 months ago • 2 comments

Hi!

I am using an addon that comes with a Visual Studio C++ debugger visualization file (natvis) in their src/ folder, and it's a bit of a pain because everytime I regenerate the project solution, it seems the OF generator treats it as a "C/C++ compiler" item, which means the C++ compiler is trying to compile the natvis and fails.

The fix should be simple, the OF generator should recognize natvis files and flag them as "C++ debugger visualization file" during the vcxproj generation step.

However, I have no idea how the generator works or where that fix would make sense. If someone can point me to it, or implement it, it would be a great time saver.

Thanks!

Image

Scylardor avatar Apr 21 '25 20:04 Scylardor

Hi!

Can you share more info on the addon you are using and what the natvis files look like?

Is it needed to be added to the VS project? ie: can we just have the projectGenerator ignore them?

Thanks!

ofTheo avatar Apr 21 '25 23:04 ofTheo

Hi, this is an addon I'm working on myself, but it's not online yet... :-)

The natvis file is an XML-like file that Visual Studio reads in order to understand how to customize the display of types in the debugger. Actually the first time I encountered this issue was by trying to use the natvis of glm, the mathematics library OF uses. glm uses SIMD types under the hood, so the variables in the debugger are a bit messy to read without a natvis.

It is entirely optional, it is only for easier debugging and the project generator could safely ignore it. But then I would have to add it back manually every time I regenerate the project.

Scylardor avatar Apr 22 '25 02:04 Scylardor