[Ecls-list] passing compiler and linker options through 'compile-file'

marc daya marc.daya+ecl at gmail.com
Mon Sep 3 04:50:10 UTC 2007


Greetings,

Is there a way to pass compiler and linker options to the gcc/dllwrap
invocation that ECL spawns for 'compile-file'?  My intention is to use
ECL's static FFI to construct an interface to a native library, so
that the functionality that it provides is available to an ECL image
(by loading a compiled fasl).

To get this to work I need to be able to pass the location of the
header files during the compile phase, and the library path and name
during the link phase, but I couldn't find anything in the
documentation that shows how this might be done.
I  got it working (under MinGW) by adding 3 new keyword arguments to
'compile-file' (:cc-flags, :ld-path, :ld-libs).  The value of
'cc-flags' is passed to 'compiler-cc', and 'ld-path' and 'ld-libs' to
'bundle-cc'.

Since I'm not sure, though, if this the best (or even correct)
approach.  Any comments or suggestions would be appreciated.

.marc




More information about the ecl-devel mailing list