[Ecls-list] How to prepend a "prologue" to the c-code generated by asdf:make-build?

Dietrich Bollmann dietrich at formgames.org
Sun Jul 7 12:22:45 UTC 2013


Hi,

I am trying to use ECL as scripting language for a large Windows program
(Rhino3D).

When including the precompiled headers required by Rhino plugins with

   (ffi:clines "#include \"StdAfx.h\")

and building the library with (asdf:make-build system :type :shared-library
...)

I get the following error:

  fatal error C1189: #error :  WINDOWS.H already included.  MFC apps must
not #include <windows.h>

Moving the include statement to the very top of the generated c file
(before the #include <ecl/ecl-cmp.h> sttement), however, and compiling
manually works.

I tried to make use of the "prologue-code" option and solve the problem by
prepending the include statement to the generated code as follows:

  (asdf:make-build system :type :shared-library :prologue-code "#include
\"StdAfx.h\"" ...)

But the prologue-option string was not inserted anywhere into the generated
code.

Any idea about how to solve the problem?

Thanks for your help,

Dietrich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20130707/a8a23753/attachment.html>


More information about the ecl-devel mailing list