Page 1 of 1

Pattern for VC

Posted: Thu Mar 22, 2012 5:25 pm
by frank_frl
Hi,

I have to work on a Visual Studio project, which I can not import because it will occasionally be changed by an other program. Since I don't wanna use Visual Studio as editor, I managed to build with CL by doing a custom build calling 'devenv /nologo xxx.sln /build Release'. That works like a charm.
The only problem I have is that CL is not marking the errors in the output window. My knowledge about regex is very little, so I don't know how to change the error patterns to work correct. :(
An error output looks like this:

Code: Select all

1>..\..\Source\CMainComponent.cpp(63) : error C2146: syntax error : missing ';' before identifier 'setSize'
The current pattern like this:

Code: Select all

(^[a-zA-Z\\\.0-9 _/\:\+\-]+ *)(\()([0-9]+)(\))( \: )(error)
File name index 1
Line number index 3
Any suggestions?

Frank

Re: Pattern for VC

Posted: Thu Mar 22, 2012 8:27 pm
by eranif
Hi Frank,

I use VC on daily basis at work. The only different is that you are using devenv to perform the build, while I use 'NMAKE' (I am using qmake to generate the NMAKE files)
The pattern defined in codelite is set toward capturing the VC compile output, but you have an extra characters in the output that fails to regex.

this prefix:

Code: Select all

1>
Is the cause of the problem (and it is produced by Visual Studio)

Change the regex to:

Code: Select all

([0-9]+\>)?([a-zA-Z\\\.0-9 _/\:\+\-]+ *)(\()([0-9]+)(\))( \: )(error)
File 2
Line 4

It should capture it.

Eran

Re: Pattern for VC

Posted: Thu Mar 22, 2012 9:14 pm
by frank_frl
eranif wrote:
Change the regex to:

Code: Select all

([0-9]+\>)?([a-zA-Z\\\.0-9 _/\:\+\-]+ *)(\()([0-9]+)(\))( \: )(error)
File 2
Line 4
Hi Eran,

thanks a lot, that fixed it. :D

The problem is that I have to work with JUCE on PC and MAC and we are working with 3 people on one project, where one guy prefers to work with VC, the other with xCode and I with CL. ;) In JUCE the whole project settings and changes are done with the Introjucer, which generates VC and xCode project files. So it is easier for me to use devenv and xcodebuild with the original project files from within CodeLite.

Best regards

Frank