chicken-users
[Top][All Lists]
Advanced

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

Re: Compile error with C library on Windows (Manual > Getting started >


From: Timothy Rooney
Subject: Re: Compile error with C library on Windows (Manual > Getting started > Accessing C libraries)
Date: Wed, 27 Jan 2021 21:00:23 -0600

On Wed, Jan 27, 2021 at 1:34 PM Josh Helzer <josh@helzer.org> wrote:
>
> Greetings!
>
> First-time CHICKEN user here!  :D
>
> In working through the "Getting started" chapter of the manual, I've hit a 
> snag in "Accessing C libraries" 
> (https://wiki.call-cc.org/man/5/Getting%20started#accessing-c-libraries-), 
> namely that gcc (via csc) complains about multiple definitions of both 
> "C_toplevel" and "main" when run on Windows.
>
>
> Steps: ...

Hi Josh,

I was able to reproduce this with both 32-bit and 64-bit MinGW under
MSYS2. The cause is that csc expects object files to have the .obj
extension, not a .o extension, when using MinGW. If you build fib.c
with "gcc -c fib.c -o fib.obj" and update its reference in the csc
line it will work.


Thanks,
Tim



reply via email to

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