chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] windows shell problem


From: felix winkelmann
Subject: Re: [Chicken-users] windows shell problem
Date: Tue, 6 Jan 2009 11:32:04 +0100

On Tue, Jan 6, 2009 at 12:00 AM, Tobia Conforto
<address@hidden> wrote:
>
> Have you tried adding an .exe extension to csi?
>
> Like: "c:\home\chicken-trunk\bin\csi.exe"
>
> I know it sounds stupid...

No, it doesn't. But I'm quite sure John is right with his assumption.

>
>
> You could try and translate the first filename (the csi executable) to a
> short name and use single quotes on the rest of the line, assuming the C
> library csi is linked to understands single quotes:

Does the Windows shell handle single quotes?

>
> c:\home\chicke~1\bin\csi -bnq -e '(require-library setup-api)' -e '(import
> setup-api)' 'c:\...some...path...\defstruct.setup'
>
>
> Anyways, I think you should dump system(3) and just use CreateProcess:
>
> char *exe = "c:\\home\\chicken-trunk\\bin\\csi.exe";
> char *cmdline = "csi -bnq -e \"(require-library setup-api)\" -e \"(import
> setup-api)\" \"c:\\...some...path...\\defstruct.setup\"";
>
> STARTUPINFO si;
> PROCESS_INFORMATION pi;
> memset(&si, 0, sizeof(si));
> si.cb = sizeof(si);
>
> if (! CreateProcess(exe, cmdline, 0,0,0,0,0,0, &si, &pi)) {
>        printf("Error %d executing:\n%s\n%s\n", GetLastError(), exe,
> cmdline);
>        exit(1);
> }
>

This might be the right solution. I'll try this, or alternatively
use get short-path-name trick given by Lars.


cheers,
felix




reply via email to

[Prev in Thread] Current Thread [Next in Thread]