[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: #1655: csc: when .c files are supplied and -c is given, the -o optio
From: |
Chicken Trac |
Subject: |
Re: #1655: csc: when .c files are supplied and -c is given, the -o option has no effect |
Date: |
Sun, 01 Dec 2019 13:21:53 -0000 |
#1655: csc: when .c files are supplied and -c is given, the -o option has no
effect
-----------------------------------+------------------------------
Reporter: kristianlm | Owner: felix winkelmann
Type: defect | Status: reopened
Priority: major | Milestone: 5.2
Component: core tools | Version: 5.1.0
Resolution: | Keywords:
Estimated difficulty: medium |
-----------------------------------+------------------------------
Comment (by Kooda):
I think that the patch to error out is right here, and that this method of
adding a C file to the custom-build script is wrong.
It only happens to work when building a shared object, but doesn’t work
when building a static object (csc is not making an archive file) or when
cross-compiling, as Kristian originally reported.
The two proper methods of linking a C library to a Scheme library are:
`#include <the_c_file>` inside a `foreign-declare` for example, or using
the `c-object` component to build the C library and `objects` component
property to link that C library to the Scheme one.
The first method always works, the second requires CHICKEN 5.1.0 or later.
--
Ticket URL: <https://bugs.call-cc.org/ticket/1655#comment:10>
CHICKEN Scheme <https://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.
- Re: #1655: csc: when .c files are supplied and -c is given, the -o option has no effect,
Chicken Trac <=