Hi. I created a VisualGDB project that compiles on WSL using msbuild. This project references a shared project and the cpp file locations are listed using msbuild macros:
shared.vcxitems
<ClCompile Include=”$(MSBuildThisFileDirectory)..\..\..\common\private\foo.cpp” />
When VisualGDB tries to compile the project on WSL the error occcurs: error : target pattern contains no ‘%’. Within the .mak file you will see that the path is not being properly converted to the linux WSL path. It should be /mnt/c, not C:/.
-include VisualGDB/Release/foo.dep
VisualGDB/Release/foo.o: C:/build/src/../../../common/private/foo.cpp VisualGDB/Release/foo.gcc.rsp
@echo foo.cpp
$(_V)/opt/gcc710/bin/g++ @VisualGDB/Release/foo.gcc.rsp -c “C:/build/src/../../../common/private/foo.cpp” -o “VisualGDB/Release/foo.o” -MD -MP -MF “VisualGDB/Release/foo.dep”
This appears to be an issue with any macro used within visual studio to set a .h/.cpp file location. Is there a workaround or a fix we can apply? I’m using the latest visualgdb in trial mode.
Thank you,
Jon