[gambit-list] Adding multiple gsc generated C files to a project

Roger Wilson misterrogerwilson at gmail.com
Thu Jul 7 08:53:06 EDT 2011

On Thu, Jul 7, 2011 at 1:07 PM, Alex Queiroz <asandroq at gmail.com> wrote:

> Hallo,
> >
> > i.e. the code in my app that initiates Gambit looks like the standard....
> >
> >  ___setup_params_reset (&setup_params);
> >     setup_params.version = ___VERSION;
> >     setup_params.linker = LINKER;   // <-------  Can only specify one
> module
> > here
> >     setup_params.debug_settings = debug_settings;
> >
> >     ___setup(&setup_params);
> >
> >
>      You must call gsc with all your modules on the command line:
> $ gsc -link mod1.scm mod2.scm mod3.scm ... master.scm
> and then you only need to "link" with the master module in your C code.
> Cheers,
> --
> -alex
> http://www.artisancoder.com/


Thanks, that was the answer I was looking for.  However, in my case
unfortunately it doesn't help as I can't get  $ gsc -link "_meroon.scm" to
generate code.  I run Bradley Lucier's make_maroon, which basically
concatenates all the Meroon scm files together into _meroon.scm, and then
when I try $ gsc -link "_meroon.scm" I get

*** ERROR IN feature-present? -- Unbound variable: *meroon-features*

I suspect this is because of the way Meroon bootstraps itself.

The only way I've been able to generate C code from Meroon is..

$ gsc
(load "old-load.scm")
(old-load "pre_meroon.scm")
(compile-file-to-c "_meroon.scm")
(link-incremental '('"meroon"))

That generates _meroon.c and _meroon_.c which leads me to the original
problem above.  I've no idea if the C files generated that way do what I
want though, as I've not been able to run any of the code in them.

Any ideas where I go from here?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20110707/6d72e8a0/attachment.htm>

More information about the Gambit-list mailing list