Peter, Thank you, that explains everything I was confused about! The only issue remaining is the error with the compile deploy process trying to copy files from the CHICKEN directory. I didn't rename the CHICKEN directory to CHICKEN-IUP, that's what the pre-built binary for Windows with IUP called it, and the path is correct, but libchicken.dll is in c:\chicken-iup\bin not c:\chicken-iup\lib. Instead, c:\chicken-iup\lib has libchicken.a and libchicken.dll.a within it. I only needed to manually copy numbers.so from the C:\chicken-iup\lib\chicken\7 directory to make it work.
Rob On 4 October 2015 at 23:00, Peter Bex <[email protected]> wrote: > 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 > possible? > > > I manually copied numbers.so 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 numbers.so 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? > > Cheers, > Peter >
_______________________________________________ Chicken-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-users
