|
|
| Author |
Message |
pjc30943
Joined: 02 Dec 2005
Posts: 220
|
|
Posted: 31 July 2009, 21:14 PM Post subject: Back-End build process error: lvalue required |
|
|
The code below produces the back-end error:
Biped_Test_Routines_2legs.c: In function 'zf_testValveEquation':
Biped_Test_Routines_2legs.c:11: error: lvalue required as decrement operand
make: *** [Biped_Test_Routines_2legs.o] Error 1
...
Error: one or more errors occurred in the back-end build process for "biped 2legs.zxb"
Changing the condition to something else, for example to "var1 > 0.0" allows compilation. Further, if var1 is greater than zero (instead of negative, say -100.0 as shown here) compilation completes successfully.
| Code: | public sub loopError()
dim var1 as single, var2 as single
var1 = -100.0
var2 = -var1
do until var1 > var2
loop
end sub |
|
|
| Back to top |
|
 |
dkinzer Site Admin
Joined: 03 Sep 2005
Posts: 2499
Location: Portland, OR
|
|
Posted: 31 July 2009, 23:07 PM Post subject: |
|
|
The cause of the problem has been located and a solution identified, implemented and preliminarily tested. You can retrieve an experimental version (i.e. not fully tested) via the link below.
http://www.zbasic.net/download/ZBasic/2.8/ZBasic_2-8-9.zip |
|
| Back to top |
|
 |
pjc30943
Joined: 02 Dec 2005
Posts: 220
|
|
Posted: 01 August 2009, 2:11 AM Post subject: |
|
|
| Thanks Don. |
|
| Back to top |
|
 |
GTBecker
Joined: 18 Jan 2006
Posts: 457
Location: Cape Coral
|
|
Posted: 01 August 2009, 21:31 PM Post subject: Back-End build process error: lvalue required |
|
|
Coincidentally, Don, I've just switched a project to a ZX-24n. On
compile, I get an "Error: one or more errors occurred in the back-end
build process for 'HydraLight.zxb'", but with no hint of what or where
the error is. Where do I go from here?
Tom |
|
| Back to top |
|
 |
dkinzer Site Admin
Joined: 03 Sep 2005
Posts: 2499
Location: Portland, OR
|
|
Posted: 01 August 2009, 21:56 PM Post subject: Re: Back-End build process error: lvalue required |
|
|
| GTBecker wrote: | | [...]but with no hint of what or where the error is. Where do I go from here? | The source of the error is (mostly) beyond your control. The only recourse that you have is to write your code differently to avoid having the ZBasic compiler generate code that leads to the back-end compilation error.
You could add the --keep-files option to your project file. This will prevent the ZBasic compiler from deleting the intermediate (C source code) files and the file that captures the error output. You could also add the --verbose option which will display the output from the back-end compile operation in the IDE's output window. Either way, you'll be able to see the error message that is output by the back-end compile operation, look at the generated C code in the vicinity of the error and possibly be able to determine what's wrong with the generated code. Even so, there's not much you can do about it.
If you can produce a small test case that generates the same error, we can probably correct it fairly quickly. If you don't want to take the time to do that, you can send me your entire project and we'll take a look at it. |
|
| Back to top |
|
 |
GTBecker
Joined: 18 Jan 2006
Posts: 457
Location: Cape Coral
|
|
Posted: 02 August 2009, 16:09 PM Post subject: |
|
|
| FYI, Don found that my difficulty was a out-of-date ZX library. I was not current with the IDE and inadvertently mixed an earlier version with the current experimental compiler. Fixed. |
|
| Back to top |
|
 |
|