chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Multiple Modules - Cross Reference


From: Bahman Movaqar
Subject: Re: [Chicken-users] Multiple Modules - Cross Reference
Date: Sun, 14 Dec 2014 23:50:06 +0330
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0

On 12/14/2014 09:55 PM, Richard wrote:
> Hello Bahman,
>
>
> You have to emit (and compile) the import library for misc.scm, like you
> did for touka.scm i.e:

Thanks for the hint. So the rule is to compile the ".import.scm" for any
module that is supposed to be imported by others?

>
> (compile -d0 -O2 -J -s misc.scm)
> (compile -d0 -O2 -J -s misc.import.scm)
>
> all should work now.

Nope. Though the error message has changed to the following:

    'csi' -s run.scm touka
    Error: (import) during expansion of (import ...) - cannot import
from undefined module: misc

From what I can understand it is choking on "run.scm" which is a very
simple file:

    (use test)

    (load "../misc")
    (import  misc)
    (include "misc-tests")

    (load "../point")
    (import point)
    (include "point-tests")

    (test-exit)

>
> good luck and no worries about 'spamming' the list.

Thanks!

>
> Bahman Movaqar writes:
>
>> First of all, sorry for spamming the list :-)
>>
>> So, I've got two modules:
>>
>>     ;; misc.scm
>>     (module misc
>>       ...)
>>
>>     ;; point.scm
>>     (load "misc")
>>     (module point
>>       (...)
>>       (import scheme chicken)
>>       (use srfi-1 misc)
>>       ...)
>>
>> And I've setup the project like below:
>>
>>     (compile -d0 -O2 -J -s touka.scm)
>>     (compile -d0 -O2 -s touka.import.scm)
>>     (compile -d0 -O2 -s point.scm)
>>
>>     (install-extension
>>      'touka
>>      '("touka.so" "touka.import.so" "misc.so" "point.so")
>>      '((version "0.0.1")))
>>
>> However the test (compile) phase aborts withe the following error:
>>
>>   'csc' -feature compiling-extension -setup-mode    -d0 -O2 -s point.scm
>>   Syntax error (import): cannot import from undefined module
>>     misc
>>
>> I need some help deciphering this message. "misc.scm" successfully gets
>> compiled to .so which I load at the beginning of "point".
>> What am I doing wrong?

-- 
Bahman Movaqar

http://BahmanM.com - https://twitter.com/bahman__m
https://github.com/bahmanm - https://gist.github.com/bahmanm
PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com)


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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