Problem with OpenScheme 
Author Message
 Problem with OpenScheme

Hi All,
I'm using OpenScheme for linux but I have a problem
with the compilation:

# gcc -L /usr/local/osm-1.2/lib/Linux-i586 \
          -o fact fact.o main.o -lgdw_c -losm_c -lm -lld

/usr/bin/ld: cannot open -lld: No such file or directory
collect2: ld returned 1 exit status

what library have I to include in my RedHat distribution?
Thanks in advance

--
Unofficial DUKE NUKEM Football Team Site!!       | J.
http://www.*-*-*.com/ ;  | T.
To reply me remove SPOCK from my email address   | Kirk



Mon, 18 Mar 2002 03:00:00 GMT  
 Problem with OpenScheme


Quote:
> Hi All,
> I'm using OpenScheme for linux but I have a problem
> with the compilation:

> # gcc -L /usr/local/osm-1.2/lib/Linux-i586 \
>           -o fact fact.o main.o -lgdw_c -losm_c -lm -lld

> /usr/bin/ld: cannot open -lld: No such file or directory
> collect2: ld returned 1 exit status

> what library have I to include in my RedHat distribution?
> Thanks in advance

> --
> Unofficial DUKE NUKEM Football Team Site!!       | J.
> http://www.geocities.com/Area51/Dungeon/3358/    | T.
> To reply me remove SPOCK from my email address   | Kirk

Hi Kirk,

The dynamic library loader libdl so the flag -ldl is to be used.

Dont forget to compile the main file with --main flag. If you
want to speed up the C produced code, add --allow-inline and
--allow-direct flags (These both flags are replaced by -O=yes in
1.3.1 that is commin in a few days).

Sincerely.

Sent via Deja.com http://www.deja.com/
Before you buy.



Mon, 18 Mar 2002 03:00:00 GMT  
 Problem with OpenScheme

Quote:

> Hi Kirk,

> The dynamic library loader libdl so the flag -ldl is to be used.

Thank you,
but the User Guide is wrong in this point. Please correct the
file node32.htm
Now I have these problems:


Quote:
> -o fact fact.o main.o -lgdw_c -losm_c -lm -ldl

fact.o: In function `OSM_ENTRY_fact':
fact.o(.text+0x4b): undefined reference to `OSMvm'
fact.o: In function `_fact_1':
fact.o(.text+0x73): undefined reference to `OSMvm'
fact.o(.text+0x79): undefined reference to `OSMvm'
fact.o(.text+0x81): undefined reference to `OSMvm'
fact.o(.text+0x87): undefined reference to `OSMvm'
fact.o(.text+0x8d): more undefined references to `OSMvm' follow
collect2: ld returned 1 exit status

Before compile, I've typed

source /usr/local/osm-1.3/Linux-i586/bin/set-env.sh

and the source, is the example on the user guide.

Thank you very much

--
Unofficial DUKE NUKEM Football Team Site!!       | J.
http://www.geocities.com/Area51/Dungeon/3358/    | T.
To reply me remove SPOCK from my email address   | Kirk



Tue, 19 Mar 2002 03:00:00 GMT  
 Problem with OpenScheme


Quote:

> > Hi Kirk,

> > The dynamic library loader libdl so the flag -ldl is to be used.

> Thank you,
> but the User Guide is wrong in this point. Please correct the
> file node32.htm

updated! Thanks.

Quote:
> Now I have these problems:


> > -o fact fact.o main.o -lgdw_c -losm_c -lm -ldl
> fact.o: In function `OSM_ENTRY_fact':
> fact.o(.text+0x4b): undefined reference to `OSMvm'
> fact.o: In function `_fact_1':
> fact.o(.text+0x73): undefined reference to `OSMvm'
> fact.o(.text+0x79): undefined reference to `OSMvm'
> fact.o(.text+0x81): undefined reference to `OSMvm'
> fact.o(.text+0x87): undefined reference to `OSMvm'
> fact.o(.text+0x8d): more undefined references to `OSMvm' follow
> collect2: ld returned 1 exit status

> Before compile, I've typed

> source /usr/local/osm-1.3/Linux-i586/bin/set-env.sh

> and the source, is the example on the user guide.

We appologize for the error in the doc.

First, the main program looks beter if it is as:

;------------
(use 'r4rs)
(use 'fact)

(let loop ()
  (display "fact> ")
  (let ([n (read)])
    (cond [(eof-object? n)
           (display "terminated\n")
           (exit)]
          [(and (integer? n)
                (>= n 0))
           (display "==> ")
           (display (fact n))
           (newline)]
          [else
           (display "invalid integer")])
    (loop)))
;----------------

Then compile the both Scheme sources as indicated. ou get 2 C files.
To compile them with gcc, do as in the doc, but add -I. in the option
list to allow the compiler to find include files in the current
directory. Add also -DNDEBUG when you compile C produced files: We need
to change the things to allow users to debug produced code. This will be
updated in the next version (1.3.1). Notice that you can call  C code
that is compiled in debug mode, and use the C de{*filter*} to enter in it.

Then link all the files. You can chose to link the osm lib statically
or dynamically:

gcc -static -L$OSM_LIB_PATH fact.o main.o -losm_c -lgdw_c -lm -ldl

or

gcc -static -L$OSM_LIB_PATH fact.o main.o -losm_c -lgdw_c -lm -ldl

In this case, LD_LIBRARY_PATH contain the OSM_LIBRARY_PATH path

Please, send us your surface address, we will send you a standard
edition as soon as it is released.

Thank you for the bug report.

Quote:

> Thank you very much

> --
> Unofficial DUKE NUKEM Football Team Site!!       | J.
> http://www.*-*-*.com/ ;  | T.
> To reply me remove SPOCK from my email address   | Kirk

Sent via Deja.com http://www.*-*-*.com/
Before you buy.


Tue, 19 Mar 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. OpenScheme 1.3.8 available

2. OpenScheme 1.3.6 available

3. OpenScheme 1.3.5 available

4. OpenScheme 1.3.4

5. *** OpenScheme 1.3.2 available

6. *** OpenScheme 1.3.1 available

7. OpenScheme 1.3 released

8. Is OpenScheme Dead?

9. Need help installing OpenScheme osm-1.3.8

10. OpenScheme 1.3.8 available

11. An OpenScheme example for mod_lisp

12. OpenScheme 1.3.7 released

 

 
Powered by phpBB® Forum Software