Compiling Problem

Questions and discussion about the ZBasic IDE.
Post Reply
hacktorious
Posts: 15
Joined: 22 February 2007, 12:05 PM

Compiling Problem

Post by hacktorious »

I have created a project with two files: navigation.bas, and directions.bas

Whenever I try to compile the project, the actual contents of the directions.bas file gets overwritten with the following data:

===== file: navigation.bas
0000 10a000 LODSP 0x00a0 (160)
0003 1b1100 PSHI_W 0x0011 (17)
0006 1ba000 PSHI_W 0x00a0 (160)
0009 1b0000 PSHI_W 0x0000 (0)
000c fe4a SCALL TASK_START
000e 01fdff BRA 000e

Sub Main()
End Sub
0011 06 RET

===== file: directions.bas

Code: 18 bytes, RAM: 0 bytes, Persistent memory: 0 bytes
Target Device: ZX24, Minimum VM version: v1.1.2
RAM size: 1536, heap size: 256

Is this a bug? How can I stop my src files from being overwritten by the compiler? Thanks.
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Post by dkinzer »

The content that you indicated looks like that normally written to the listing file (if enabled). Take a look at your .pjt file and see if there is a line near the top that looks like this:

Code: Select all

--list=directions.bas
If this line is present, it will cause the file directions.bas to be overwritten with the listing information. This can be prevented by commenting out or deleting this line or by changing the extension to something else, e.g. .lst.

It might be useful to paste your .pjt file contents in a message here so we can see what is in it. Are you seeing this when you run the IDE under Wine or when running on a Windows PC? If the former, there might be some end-of-line issues where Wine is trying to do you a favor and ends up getting in the way.
- Don Kinzer
hacktorious
Posts: 15
Joined: 22 February 2007, 12:05 PM

Post by hacktorious »

Unfortunately I have not been able to get com1 to work with the bot via wine. Thus, I am stuck with Windows XP.

I have recreated and renamed the project. Here is the contents of the pjt:
RoamingWithIr.bas
Directions.bas

I am now getting a different error, which is posted below:

>"C:\Program Files\ZBasic\zbasic.exe" --target-device=ZX24a --directory="C:\Documents and Settings\scott\My Documents\projects\ZBasic/" --project="RoamingWithIr.pjt"
Error: duplicate module "Directions", file "Directions.bas"
>Exit code: 1

The error occurs when I run Go from the Project pulldown.
hacktorious
Posts: 15
Joined: 22 February 2007, 12:05 PM

Post by hacktorious »

Unfortunately I have not been able to get com1 to work with the bot via wine. Thus, I am stuck with Windows XP until I figure it out.

I was able to get it working. Thanks for the help.
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Post by dkinzer »

hacktorious wrote:I was able to get it working.
Which were you able to get working - Wine or XP? What did you change?
- Don Kinzer
hacktorious
Posts: 15
Joined: 22 February 2007, 12:05 PM

Post by hacktorious »

Unfortunately only XP. I just created a new project under a new name, then copied my code into it.
Post Reply