chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Compiling Chicken-compiled-to-C file.c does not link


From: wiffel
Subject: Re: [Chicken-users] Compiling Chicken-compiled-to-C file.c does not link
Date: Thu, 12 Jun 2014 17:27:37 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

Hi Nikos,

If you remove the definition of the 'main' function and add an expression like this:

    (time (go 200000))

and compile it with:

   csc -static -O5 array1.scm

you should end up with a statically linked application 'array1'
that is optimized for speed (because of the -O5).

Runs in about half a second on my computer.

Good Luck,
Wiffel

On 12/06/14 15:11, Nikos Vasilakis wrote:
Hello everyone,

I am trying to compile a simple scheme program down executable through
C, with no success. My program is array1 from the Kernighan and Van
Wyk Benchmarks, as implemented here [1]. I am using chicken 4.7 on
ubuntu 12.04 (details: [2]) and grabbed the chicken.h header file from
a github repo [3].

In particular, `chicken array1.scm` creates array1.c, but running `gcc
array1.c` throws a big number of "undefined reference to .." ending
with "collect2: ld returned 1 exit status" [4].

So that people help out most, my eventual goal is to compile a
statically linked executable binary. Ideally, therefore, I would need
to have a "chicken.c" or the chicken runtime linked in.

Thanks so much!
Nikos


[1]
http://www.ccs.neu.edu/home/will/Twobit/src/array1.scm

[2]
Version 4.7.0
linux-unix-gnu-x86-64 [ 64bit manyargs dload ptables ]
compiled 2011-10-17 on allspice (Linux)

[3]
https://github.com/scottbronikowski/rootfs/blob/2f5ad469b3ad3186ed7767c99c69d2b6fe8da429/usr/include/chicken/chicken.h

[4] http://pastebin.com/xNEiVeZG

_______________________________________________
Chicken-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/chicken-users




reply via email to

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