Trouble using link to make an executable

Q&A's, tips, howto's
Locked
electrifiedspam
Posts: 27
Joined: Sat Nov 06, 2010 11:39 pm

Trouble using link to make an executable

Post by electrifiedspam »

Sorry all, I am new.

I have been working through the tutorial and I have managed to get
(load "file:///C:/Program Files/newlisp/util/link.lsp")

to work, but I couldn't just use (load "link.lsp").

Now that it is working I am having trouble using it to create the exectable hw.exe.

I am running windows vista and I am using newLISP 1.36.

I have tried (link "newlisp.exe" "hw.exe" "file:///C:/User/Chris/hw.lsp")

it returns:
original newlisp executable:newlisp.exe
new executable:hw.exe
source:file:///C:/User/Chris/hw.lsp

ERR: array, list or string expected : (file-info orgExe)
called from user defined function link

I am sure that I need to provide more information, any help is appreciated.

Thank you in advance,

Chris

cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Re: Trouble using link to make an executable

Post by cormullion »

Hi Chris. I don't know much about this side of things, but until an expert comes along I'm guessing that the error simply means that the file "newlisp.exe" isn't where the code thinks it is. Did you copy the executable over like it says?

The code is doing something like this:

(first (file-info "newlisp.exe"))

and because the file-info function returns nil, the first function fails to find anything to get the first item of. Effectively you're typing (first nil).

Hopefully someone with Windows will be along soon... :)

electrifiedspam
Posts: 27
Joined: Sat Nov 06, 2010 11:39 pm

Re: Trouble using link to make an executable

Post by electrifiedspam »

Cormullion,

Thank you. That was just the hint that I needed to get me going.

I should have specified that I was using the IDE and not the command line. I could not get file-info to work for anything in the IDE. Figuring that the file path started from the folder in which the newlisp.exe was located, I started the newlisp.exe and then placed everything I needed in the same folder.

Presto it worked.

I am not sure why I couldn't get file:///C:/bla/bla/bla.bla to work but it could be the security settings or some other Windoze hangups.

Thank you again for the help.

Chris

Locked