[Top][All Lists]

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

Re: [Chicken-users] Windows deployment - Numbers egg

From: Peter Bex
Subject: Re: [Chicken-users] Windows deployment - Numbers egg
Date: Sun, 4 Oct 2015 17:00:14 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Sun, Oct 04, 2015 at 10:51:49PM +0800, Robert Herman wrote:
> Whoa! Hold on. When I ran "csc -deploy Pi-Ch.scm" it created a 77kb exe
> Pi-Ch.exe in a newly-created directory, Pi-Ch. When I look at the command
> line information, I found this error:
> C:\Users\Robert\Desktop\Chicken-IUP-Examples\Pi>csc -deploy Pi-Ch.scm
> The system cannot find the file specified.
> Error: shell command terminated with non-zero exit status 1: "copy /Y
> "c:\chicken-iup\lib\libchicken.dll" "Pi-Ch""

This looks like you may have renamed the chicken directory.  Is that

> I manually copied into the Pi-Ch directory and libchicken.dll,
> and it ran! Thanks to all.

I'm not sure if that's going to work in the general case.  If you
include an egg that itself depends on other eggs, it might not be
able to load them because the egg doesn't know it's linked into a
deployed executable.

> Next question is what does 'csc -static' do?

It's supposed to generate a statically linked executable.

> I don't mind sending libchicken.dll and along with the exe,
> but why does 'csc -dynamic -static Pi-Ch.scm' do the same,

I think those options are supposed to be mutually exclusive, but
maybe the latter overrides the former.

Compiling a program statically only works if you also have static
versions of all the libraries it uses.  Most eggs don't install
static copies of their libraries (neither does numbers).  Besides,
(use numbers) says "load the numbers module dynamically".  If you
want to compile statically, you'd have to do something like

(declare (uses numbers))
(import numbers)

But I'm not 100% sure.  This is going to be made easier in CHICKEN 5,
at least that's the plan.

> but the exe is now 1.6mb vs 77kb?

It does include libchicken.dll (but not numbers because you didn't
declare it statically)

> I was hoping the two csc switches would combine numbers.os and
> libchicken.dll in the exe, in other words, statically link them.

You can't load a .dll file statically; it's inherently dynamic.
However, if you have libchicken.a, you can link _that_ statically
into your program.  Like I said, you'll also need to somehow create
a "numbers.a" file to link into your program.

> Also, I guess there is some issue with the copy command in
> MinGW64-32 bit or paths, but the format looks correct even in the
> Error line?

Does the file it mentions exist?


Attachment: signature.asc
Description: Digital signature

reply via email to

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