To better understand the questions you might need some context. Bear with me...
Background: I am involved in developing an embedded application. The embedded s/w is built on a Linux system. Compiler is GCC. My workstation is a Windows system. Up until now I have used Code::Blocks on this Windows system to edit the files on the Linux system. I then do "Save all" in C::B, switch to a PuTTY session to the Linux system and do the build. Getting errors I have to go back to C::B and locate eg. a syntax error "by hand".
So today I talked with one of our Linux gurus who helped me out. We took advantage of Cygwin being installed on my Windoze system, and after some tests I thought I saw an opportunity to get a much more streamlined process.
I have set up a tool in C::B like this:
Name: Build
Executable: C:\cygwin\bin\ssh.exe
Parameters: myUserName@theLinuxSystem make -C pathToMakefileDirectory
(*) Launch tool hidden with standard output redirected
This enables me to activate a build from within C::B.
And now the questions / troubles I still have:
1. Is there a way to get all files saved automagically before a tool is executed?
2. Errors in the build are coming back to the Code::Blocks tab of the Messages window like this:
stderr> ../Frameworks/ClassLib/PropertyLib/PropertyContainer.cpp:283: error: `unlnk' undeclared (first use this function)
Is there a problem with C::B parsing this so that I can double-click on the error message in order to get the editor to go to that line? Or is that functionality not present in the Code::Blocks tab? Or...?
If you see what I am aiming at (a "remote build with locally usable error messages in one click"), then you might have advice on another way to achieve this?
Solved more of the problems: Making a new shortcut made the new correct tabbed dialogue box re-appear (no idea why...).
So now I can start tinkering with this parsing of errors. To restate, an error message looks like this:
stderr> ../Frameworks/ClassLib/PropertyLib/PropertyContainer.cpp:283: error: `unlnk' undeclared (first use this function)
Note that the makefile is not at the root of the source/project tree. This is necessary as we are building for several different targets ("production build" for the actual target, "unit test build" targteted/executed at the same system as the build is taking place on, etc. All of those builds have their own configurations so we cannot let the build spread over the source tree.) This is why the error starts with "../" .
So now I have this regexp:
stderr> \.\./([][{}() \t#%$~A-Za-z0-9_:+/\.-]+):([0-9]+):[ \t](.*)
and it does not work (nothing happends when double-clicking it). Anyone spot the mistake that I am blind for?
And to re-iterate: Tools have their outputs go to the Code::Blocks tab (NOT the "Build messages" tab) in the Messages window. Is this tab really sensitive to double-clicks?
(If the answer is actually yes, then would you suspect that Alt-F2 also works? My speculation is that both the double-clicking and Alt-F2 works only in the "Build messages" tab.)