Sysprogs forums › Forums › VisualGDB › Parenthesis in Compiler Out for "required from"
Tagged: GCC output
- This topic has 4 replies, 2 voices, and was last updated 5 years, 5 months ago by support.
-
AuthorPosts
-
June 27, 2019 at 18:37 #25223aronrubinParticipant
As GCC emits errors or warnings about items in template instanciation it tries to report the lines that caused the instantiation. These are denoted with output lines of the form
source_file_path.cpp:line:col: required from here
or of the form
source_file_path.h:line:col: required from 'class templated_class<tparams_from_instanciation>'
It seems that you modify other output lines to match VC expectations (i.e. adding parenthesis). Could you do the same for the “required from” lines so I can double click on them?Thank you
June 30, 2019 at 05:17 #25226supportKeymasterHi,
Normally, VisualGDB should be already handling this automatically.
Please try checking the BuildMessages/GCCOtherMessage element in [VisualGDB directory]\Rules\RegularExpressions.xml file. It contains a regex that is used to find the ‘required from here’ lines in the output.
Please try applying this regex to the lines from your build log that don’t get mapped correctly to see why they are not matched and then try editing the regex to work around it (you may need to restart Visual Studio in order for the changes to take effect). Feel free to share the updated regex with us so that we will include it in our product builds.
July 1, 2019 at 15:40 #25229aronrubinParticipantThe regex matches. Maybe GCCOtherMessage is not being used
July 1, 2019 at 15:49 #25230aronrubinParticipantHere I have added an error in a template to cause the message:
[7/11] Building CXX object CMakeFiles/CxxSimulatorTest.dir/src/CxxSimulatorTest.cpp.obj FAILED: CMakeFiles/CxxSimulatorTest.dir/src/CxxSimulatorTest.cpp.obj C:\msys64\mingw64\bin\x86_64-w64-mingw32-g++.exe -I../../include -isystem _deps/googletest-src/googletest/include -isystem _deps/googletest-src/googletest -isystem _deps/googletest-src/googlemock/include -isystem _deps/googletest-src/googlemock -g -std=gnu++17 -MD -MT CMakeFiles/CxxSimulatorTest.dir/src/CxxSimulatorTest.cpp.obj -MF CMakeFiles\CxxSimulatorTest.dir\src\CxxSimulatorTest.cpp.obj.d -o CMakeFiles/CxxSimulatorTest.dir/src/CxxSimulatorTest.cpp.obj -c ../../src/CxxSimulatorTest.cpp In file included from ../../src/CxxSimulatorTest.cpp:5: ../../include/CxxSimulator/Simulator.h: In member function 'void sim::Simulator::addModel()': 61 | abc(); | ^~~ ../../include/CxxSimulator/Simulator.h: In instantiation of 'void sim::Simulator::addModel() [with ModelType = EmptyModel]': ../../src/CxxSimulatorTest.cpp:43:54: required from here C:\Users\arubin\git\CxxSimulator\.\build\Debug\..\..\include\CxxSimulator\Simulator.h(61,8): error : 'abc' was not declared in this scope; did you mean 'abi'? 61 | abc(); | ~~~^~ | abi ../../include/CxxSimulator/Simulator.h: In instantiation of 'void sim::Simulator::addModel() [with ModelType = SimulationTest::LoopbackModel]': ../../src/CxxSimulatorTest.cpp:93:39: required from here 61 | abc(); | ~~~^~ | abi ninja: build stopped: subcommand failed.
July 1, 2019 at 16:53 #25231supportKeymasterThis might be something specific to a certain setup (e.g. Ninja/CMake or certain warning flags).
Please try reproducing the problem on a freshly created MinGW-based “Hello, World” project and attach the project here. If we could reproduce the problem on our side, we should be able to fix it, or suggest a workaround.
-
AuthorPosts
- You must be logged in to reply to this topic.