Back-End build process error: lvalue required

Discussion about the ZBasic language including the System Library. If you're not sure where to post your message, do it here. However, do not make test posts here; that's the purpose of the Sandbox.
Post Reply
pjc30943
Posts: 220
Joined: 01 December 2005, 18:45 PM

Back-End build process error: lvalue required

Post by pjc30943 »

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: Select all

public sub loopError()
	dim var1 as single, var2 as single
	var1 = -100.0
	var2 = -var1
	do until var1 > var2
	loop
end sub
Paul
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Post by dkinzer »

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 ... _2-8-9.zip
- Don Kinzer
pjc30943
Posts: 220
Joined: 01 December 2005, 18:45 PM

Post by pjc30943 »

Thanks Don.
Paul
GTBecker
Posts: 616
Joined: 17 January 2006, 19:59 PM
Location: Cape Coral

Back-End build process error: lvalue required

Post by GTBecker »

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
Tom
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Re: Back-End build process error: lvalue required

Post by dkinzer »

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.
- Don Kinzer
GTBecker
Posts: 616
Joined: 17 January 2006, 19:59 PM
Location: Cape Coral

Post by GTBecker »

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.
Tom
Post Reply