Re: [Chicken-users] Compiling modules

2011-09-25 Thread Blake Sweeney
On Sat, 24 Sep 2011 23:54:29 +0200, Peter Bex peter@xs4all.nl wrote:
 On Sat, Sep 24, 2011 at 05:48:58PM -0400, Blake Sweeney wrote:
  Thanks for the help but I'm still lost. I tried:
  
  $ csc -J module-a.scm
 
 I think there's a -s missing (you want to compile to a shared
 library object).  Sorry, I made this mistake in my second example
 too.
 
  I read a little and it seemed like you include import libraries that aren't 
  in
  the normal path by using the extend option when compiling. Was I wrong? 
  Could
  you give me a more help?
 
 I don't have much experience loading local libraries, but AFAIK it
 should be possible to just   (use module-a)  or (require-extension module-a)
 and it'll try to load from the current directory or the system path.

Thanks I can compile things now. 


Blake

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Compiling modules

2011-09-24 Thread Peter Bex
On Fri, Sep 23, 2011 at 10:43:23PM -0400, blakes...@gmail.com wrote:
 I'm having some trouble compiling modules and one main file into a binary. I'm
 using 4.7.0. I have 3 modules, a, b and c. Module c depends on b and a while b
 depends on a.
 
 Right now I'm trying:
 
 $ csc -c -unit module-a module-a.scm
 $ csc -c -uses module-a module-a.o module-b.scm

Units are a really old way of doing module-like things.
The reason the module is undefined when you load it is because
you don't have an import library.

Try:

$ csc -s -j module-a module-a.scm
# or csc -J module-a.scm
$ csc -s module-a.import.scm

I don't know about linking it statically.

Cheers,
Peter
-- 
http://sjamaan.ath.cx
--
The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music.
-- Donald Knuth

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Compiling modules

2011-09-24 Thread Blake Sweeney
On Sat, 24 Sep 2011 11:16:48 +0200, Peter Bex peter@xs4all.nl wrote:
 Units are a really old way of doing module-like things.
 The reason the module is undefined when you load it is because
 you don't have an import library.
 
 Try:
 
 $ csc -s -j module-a module-a.scm
 # or csc -J module-a.scm
 $ csc -s module-a.import.scm
 
 I don't know about linking it statically.

Thanks for the help but I'm still lost. I tried:

$ csc -J module-a.scm
$ csc -s module-a.import.scm
$ csc -extend module-a.import.so main.scm
$ ./main

Error: unbound variable: module-a#fn-a

I read a little and it seemed like you include import libraries that aren't in
the normal path by using the extend option when compiling. Was I wrong? Could
you give me a more help?


Thanks,
Blake

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Compiling modules

2011-09-24 Thread Peter Bex
On Sat, Sep 24, 2011 at 05:48:58PM -0400, Blake Sweeney wrote:
 Thanks for the help but I'm still lost. I tried:
 
 $ csc -J module-a.scm

I think there's a -s missing (you want to compile to a shared
library object).  Sorry, I made this mistake in my second example
too.

 I read a little and it seemed like you include import libraries that aren't in
 the normal path by using the extend option when compiling. Was I wrong? Could
 you give me a more help?

I don't have much experience loading local libraries, but AFAIK it
should be possible to just   (use module-a)  or (require-extension module-a)
and it'll try to load from the current directory or the system path.

Cheers,
Peter
-- 
http://sjamaan.ath.cx
--
The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music.
-- Donald Knuth

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] Compiling modules

2011-09-23 Thread blakes . 85
I'm having some trouble compiling modules and one main file into a binary. I'm
using 4.7.0. I have 3 modules, a, b and c. Module c depends on b and a while b
depends on a.

My modules look like:

(module module-a (...)
  (import scheme chicken ...)
  ...
)

(module module-b (...)
  (import scheme chicken ... module-a)
  ...
)

(module module-c (...)
  (import scheme chicken ... module-a module-b)
  ...
)

Right now I'm trying:

$ csc -c -unit module-a module-a.scm
$ csc -c -uses module-a module-a.o module-b.scm

Then I get:

Syntax error (import): cannot import from undefined module

module-a

I've tried not using unit and uses but that didn't seem to help. Any help would
be wonderful.


Blake Sweeney

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users