Compile error

Discussion of issues related specifically to writing code for native mode devices. This includes ZBasic code as well as assembly language code and C code, both inline and standalone.
Post Reply
dlh
Posts: 395
Joined: 15 December 2006, 12:12 PM
Location: ~Cincinnati

Compile error

Post by dlh »

When I compile my ZX-328n application I get this error
>"F:\ZBASIC\zbasic.exe" --target-device=ZX328n --directory="\\Dsm-602h\share\ZBasic Code/" --project="cm17-zxs.pjt"
Error: cannot open intermediate file "zx_HwPk44\cm17_zxs.eeb"
Version 2.8.4
>Exit code: 1
I keep my source files on a network HDD so I can access them from any machine on my LAN. The IDE has no problem finding the source but I wonder about the forward slash at the end of the --directory= directive.

The \\Dsm-602h\share\ZBasic Code\zx_HwPk44\ folder was created but it contains only cm17-zxs.c and cm17-zxs.h files - there is no cm17_zxs.eeb file.

The above was from a machine running W98SE. Here is the error message from a machine running XP Pro.
>"C:\Program Files\ZBasic\zbasic.exe" --target-device=ZX328n --directory="\\Dsm-602h\share\ZBasic Code/" --project="cm17-zxs.pjt"
'\\Dsm-602h\share\ZBasic Code'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
The system cannot find the path specified.
'\\Dsm-602h\share\ZBasic Code'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
The system cannot find the file specified.
Error: one or more errors occurred in the back-end build process for "cm17-zxs.zxb"
>Exit code: 1
There's no problem when dealing with VM projects.

Also, the Device Options dialog indicates the device chosen in the IDE can be overridden in .prj or .bas file but the debug window always shows the setting from Device Options. What is the syntax for specifying the target device in the .bas file?
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Re: Compile error

Post by dkinzer »

dlh wrote:I wonder about the forward slash at the end of the --directory= directive.
That is harmless - it is removed, when necessary when the pathname is being used. Additionally, when necessary the slashes are changed to the correct type (forward slash, backslash). Windows handles both but some applications require one or the other type.
dlh wrote:Here is the error message from a machine running XP Pro.
It works properly here (XP Pro, SP2); it's difficult to speculate why it might not in another environment. Searching for the phrase "UNC paths are not supported. Defaulting to Windows directory." produces some hits that might be useful. I suspect that using a drive letter mapped to the network store would solve the problem.
dlh wrote:What is the syntax for specifying the target device in the .bas file?
Use can use Option TargetDevice. However, the recommended method is to utilize the Device Options setting.
- Don Kinzer
dlh
Posts: 395
Joined: 15 December 2006, 12:12 PM
Location: ~Cincinnati

Re: Compile error

Post by dlh »

dkinzer wrote:I suspect that using a drive letter mapped to the network store would solve the problem.
That worked on both machines although there's a new mystery complaint on the W98SE machine.
>"F:\ZBASIC\zbasic.exe" --target-device=ZX328n --directory="H:\ZBasic Code/" --project="cm17-zxs.pjt"
Invalid switch - /Q
No errors. Target device: ZX328n, Code: 16096 bytes, RAM: 488 bytes, Persistent memory: 32 bytes
>Exit code: 0
Here is the XP Pro debug output.
>"C:\Program Files\ZBasic\zbasic.exe" --target-device=ZX328n --directory="N:\ZBasic Code/" --project="cm17-zxs.pjt"
No errors. Target device: ZX328n, Code: 16096 bytes, RAM: 488 bytes, Persistent memory: 32 bytes
>Exit code: 0
Thanks, Don, as always.
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Re: Compile error

Post by dkinzer »

dlh wrote:[T]here's a new mystery complaint on the W98SE machine.
That is probably from the DEL command that is executed as part of the build process to remove intermediate files. It is invoked with the /Q option to suppress prompting ("Do you really want to delete...") but this option is not supported in the command shell for 16-bit Windows (Win 3.x, Win98, etc.).

Thinking about this caused me to wonder how it works at all on Win98SE. The compiler invokes the command shell as CMD /C but in 16-bit Windows the command shell is supposed to be invoked as COMMAND /C. The code doesn't specifically handle the differences for 16-bit Windows because we only officially support Win2K and later.

[edit]Actually, what I said above about CMD /C isn't correct. Commands are executed using the C runtime library system() primitive which, I suspect, uses CMD /C or COMMAND /C as appropriate.
Last edited by dkinzer on 30 May 2009, 11:30 AM, edited 1 time in total.
- Don Kinzer
dlh
Posts: 395
Joined: 15 December 2006, 12:12 PM
Location: ~Cincinnati

Re: Compile error

Post by dlh »

dkinzer wrote:Thinking about this caused me to wonder how it works at all on Win98SE. The compiler invokes the command shell as CMD /C but in 16-bit Windows the command shell is supposed to be invoked as COMMAND /C. The code doesn't specifically handle the differences for 16-bit Windows because we only officially support Win2K and later.
I'll leave well enough alone, then. The W98SE machine is an old beast with ISA slots which my Digital Storage Oscilloscope card (Protek 220) needs. I use it for most of my breadboarding - I can compile, download, test, see signals on my 'scope', etc. without having to disconnect, transport, reconnect, etc. But, it's slow, so I use the XP Pro SP2 or Ubuntu machines for connecting to the world outside.

The only other problem I've had with W98SE is when there's a ZBasic upgrade, it insists on creating a new ZBasic folder under the existing ZBasic folder - F:\ZBasic\ZBasic\. I always have to do a bit of renaming, dragging, dropping, deleting, etc. to get the update moved to the proper level.

Now, I have to reconfigure my breadboard before I can download and test. I am using the XTAL on your interface card but using the Spark Fun Shifter for RS232 so I have no ATN. I need to go back to using the interface for the RS232 connection.
Post Reply