User forums > Using Code::Blocks

Compiling on a remote system (using a CB tool that runs ssh)

(1/3) > >>

johanekdahl:
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:

--- Code: ---stderr> ../Frameworks/ClassLib/PropertyLib/PropertyContainer.cpp:283: error: `unlnk' undeclared (first use this function)

--- End code ---
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?

MortenMacFly:

--- Quote from: johanekdahl on June 27, 2007, 12:53:32 pm ---2. Errors in the build are coming back to the Code::Blocks tab of the Messages window like this:

--- Code: ---stderr> ../Frameworks/ClassLib/PropertyLib/PropertyContainer.cpp:283: error: `unlnk' undeclared (first use this function)

--- End code ---

--- End quote ---
For this you need to adjust the RegExp in the advanced compiler options: Settings -> Compiler and Debugger -> Tab "other settings" -> Button "Advanced options" -> Tab "Output parsing" -> Compiler error.
Change the rexexp to have "stderr> " in fron that does not get matched and it should work. The same applies for the other parser options that may be affected.
Notice: For testing you can use the "Regular expression testbed" plugin of C::B. ;-)
With regards, Morten.

mariocup:
Hi,

perhaps this link could be interesting for you.

http://wiki.codeblocks.org/index.php?title=Installing_Uniwin_remote_compiler

Bye,

Mario

johanekdahl:
Morten!

Thank you for the quick answer. I realized I was running a too old version of C::B for the options you are referring to (I was running build 3459). So I tried to upgrade to the latest nightly, but ended up with everything broken...

What I did:

Unpacked all three 7zip-files to the same directory where the old C::B installation was. Answered "yes to all" for replacing files/folders with the same name.

What I get:
Many plugins that fail to load.
Notice about errors loggd to the log files.
A "Script run error" error box.
A startup screen that is more or less "fubar".
And when I try to access the settings you referred to C::B crashes when i click the "Advanced options" and answer the warning that follows.

I then tried to remove the share folder and unzipped again, but to no avail.

I then renamed my current C::B folder, created a new one and unzipped to there. Still the same errors.

Any advice?

(Almost every time I upgrade I have these problems, and that is why I upgrade so seldomly. I really, really, really wish for a foolproof installation program. And yes - I know that the answer is that I should write it myself... :wink:)

johanekdahl:
Mario!

Thanks for the tip, looks really interesting. I'll dig deeper into it when time permits!

Navigation

[0] Message Index

[#] Next page

Go to full version