Sublime Forum

Build system file_regex problem with cl.exe

#1

Hi guys, I am trying to make a file_regex to match visual studio’s compiler output. But when I include the “file_regex” property sublime always says “no build system”, so I suspect that it’s because file_regex is invalid. Here’s a sample output by cl.exe, visual studio’s compiler:

“c:\programming\c++_file\game_project\monter\code\monter.cpp(299): error C3861: ‘lUploadMatrix4Array’: identifier not found”

and here’s my file_regex for capturing filename, line number, col number and error message:

“file_regex”: “^(.)((\d+))()(.)$”

I tried it out on https://regex101.com/, and it does match the error output, however it won’t work with sublime’s build system. Could you guys help me find what the problem is? Thanks a ton.

0 Likes

#2

That error message sounds suspiciously like there’s something broken about the sublime-build file itself. I would try pasting it into JSONLint to verify that there’s not something like a missing comma or something like that that’s making it mad.

1 Like

#3

Oh my god you are exactly right! Sublime text can’t parse it because of the backslashes in the string. After I properly added the needed escape sequences, it worked. Thanks a ton OdatNurd!

1 Like