Viladoman / StructLayout

Visual Studio Extension for C++ struct memory layout visualization

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not working with relative include paths and full include paths that contain whitespaces

jpanneton opened this issue · comments

Repro
1- Create an empty project with a source file
2- Add a relative path in C/C++ -> Additional Include Directories
3- Include a file from this directory in your source file
4- Define a random struct after
5- Ensure it compiles
6- Run Show Struct Layout on the struct

Result
fatal error: 'included_file.h' file not found

The same result arises when there's a whitespace in a full include path. That's because include paths passed to Clang with -I don't seem to be delimited with "".

Oh Wow! Thanks bringing this into my attention.
All my tests were using $(MsBuildMacro) and I never work in folders with spaces.

I identified 3 different issues:

  • I can provide "-working-directory=$(ProjectDir)" to fix the relative paths
  • Adding quotes to paths with white spaces
  • Processing the quotes in the clang dll when a path has quotes for spaces

imho, This is a big issue, I will fix it asap.

I think I fixed the issues,

I would really appreciate if you could get the new build with the changes and validate if it now works as intended.

Thanks!

It works on my side now. Thanks for the quick fix!

Awesome! Thanks for verifying it at your end!