Sublime Forum

file_regex for MSVC 2008

#1

Hi,

Been trying to figure out the file_regex stuff for building, but I can’t seem to get it to accept it.
Might be impossible with these types of error messages, but I’ll post one anyway for example.

Error code generated by nmake.exe MSVC 2008 for a C++ project:

C:\Users\ASDF\main.cpp(13) : error C2144: syntax error : 'int' should be preceded by ';'

So it should be the following:
File: main.cpp
Line: 13

Anyone mind lending a hand?

-Thanks

0 Likes

#2

Sorry for bumping, but I didn’t feel a new topic was necessary.

I asked a buddy and he provided the following Perl-compatible regex for error string in the previous post.

(^\\]+)\(((\d+))\)\s:\serror\s^:]+:\s(.+)$

… which I converted (double escaped) into:

(^\\]+)\(((\d+))\)\s:\serror\s^:]+:\s(.+)$

so that the editor could parse it.

It’s still not working and I’m trying to figure out why.
These following links verify that the regex is working as it should, grouping the file name and line number in their respective groups.

gskinner.com/RegExr/?33pf5
http://retester-daoswald.dotcloud.com/?target=C:%5CUsers%5C1234%5Cmain.cpp(13)+:+error+C2144:+syntax+error+:+‘int’+should+be+preceded+by+’%3B’%0D%0A&regexp=(%5B%5E%5C%5C%5D%2B)%5C(((%5Cd%2B))%5C)%5Cs:%5Cserror%5Cs%5B%5E:%5D%2B:%5Cs(.%2B)$&modifiers=

Yet I’m still not getting results could this be an editor problem?

0 Likes