I am using TI compiler and when I build and errors appear in quick fix, they are not identified. The errors look like this in terminal:

"/home/sporty/HydroGuardFW/hw_2_0/hg_os/coap_resources/system_session.h", line 79: error #136: class "Sessions" has no member "session_success"

Here is how it looks in VIM, its the second line:

|| "/home/sporty/ti/ccsv8/tools/compiler/ti-cgt-msp430_18.1.3.LTS/bin/cl430" -vmspx --data_model=large --near_data=none -O2 --opt_for_speed=1 --use_hw_mpy=F5 --include_path="/home/sporty/ti/ccsv8/ccs_base/msp430/include" --include_path="/home/sporty/HydroGuardFW/hw_2_0/hg_os" --include_path="/home/sporty/HydroGuardFW/hw_2_0" --include_path="/home/sporty/HydroGuardFW/hw_2_0" --include_path="/home/sporty/ti/ccsv8/tools/compiler/ti-cgt-msp430_18.1.3.LTS/include" --define=__MSP430F5359__ --define=HYDRO_GUARD --define=NDEBUG -g --symdebug:dwarf_version=4 --c++14 --printf_support=minimal --diag_warning=225 --diag_wrap=off --display_error_number --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU40 --preproc_with_compile --preproc_dependency="hg_os/cli/commands.d_raw" --obj_directory="hg_os/cli"  "../hg_os/cli/commands.cpp"
|| "/home/sporty/HydroGuardFW/hw_2_0/hg_os/coap_resources/system_session.h", line 79: error #136: class "Sessions" has no member "session_success"
|| "../hg_os/cli/commands.cpp", line 195: error #136: class "Modem" has no member "session_success"
|| "../hg_os/cli/commands.cpp", line 201: error #141: too many arguments in function call

I tried using the following errorformat configruation

set errorformat=\"%f\"\\,\ line\ %l:\ %m
  • The line from "terminal" and the 2nd line from "vim" you pointed out are identical. Did you make a cut&paste error?
    – nst0022
    Sep 9 '18 at 12:35
  • 1
    I copied your terminal line to a file errors and opened that file as a quickfix list with vim -q errors. The line in the resulting quickfix list looked as it should: /home/sporty/HydroGuardFW/hw_2_0/hg_os/coap_resources/system_session.h|79| error #136: class "Sessions" has no member "session_success". So you shouldn't have to change Vim's default 'errorformat' for it to work.
    – garyjohn
    Sep 9 '18 at 20:14
  • @nst0022, the line in terminal is the raw compiler output, the second line demonstrates how that line is shown in VIM. VIM simply adds || to the beginning of the line instead of matching it as an error. Sep 10 '18 at 11:19
  • @garyjohn, Opening errors file with the -q option pointed me in the right direction. Solved!! The issue was in asyncrun.vim configuration. Sep 10 '18 at 17:22
  • @user1135541: Got it. Then I guess you simply missed the error %n part in your format string.
    – nst0022
    Sep 10 '18 at 20:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.