Wednesday, 18 March 2015

Gambas, mixing versions, & "Compile All"

This is a reminder to me.

And once I've written it down, I'll probably stop forgetting it!

This should stop me being puzzled when my Gambas applications don't execute as expected.

I frequently start writing a Gambas application on one computer (usually my ASUS laptop) and then move the project to another (often a Raspberry Pi).

Most of the time this is fine, no problems. But sometimes the program just doesn't execute within the IDE as expected once its been moved.

When there are problems, they are often subtle. I've just fallen over the problem again, where my code does not execute a new function added since the sources were moved. Stepping through the code I notice that it reaches the call to SetClock() and just ignores it. Moving the call to another line (e.g. a couple of lines up) makes not difference.

A clearer indication happened a few months ago, when the IDE reported some kind of byte code error.

So anyway, long story short, a project created on one version of Gambas can often be opened and run in the IDE on another version of Gambas.

Unfortunately, when you hit the Run button, the project doesn't run from a clean start. It seems to rely on bytecode created when the project was previously run in another version of Gambas.

The solution is very simple: go to menu Project and select Compile All.

It seems odd that you should have to do this, but "Hey!" I can live with it.

No comments:

Post a Comment