[lisaac-Bugs][311020] Undefined reference to `print_char`

lisaac-bugs at alioth.debian.org lisaac-bugs at alioth.debian.org
Thu Sep 4 10:42:47 UTC 2008


Bugs item #311020, was opened at 24/08/2008 15:48
Status: Open
Priority: 3
Submitted By: Jeremy Cowgar (jeremy-guest)
>Assigned to: Benoit Sonntag (sonntag-guest)
Summary: Undefined reference to `print_char` 


Initial Comment:
If you do not include something.print; in your app, then you will get an undefined reference to print_char during link:

C:\lisaac\bin>lisaac.exe hello.li
Depending pass: ... (3)
Executing pass: *...... (7)
 => 0 second(s).
Run `gcc ./hello.c -o ./hello.exe -lgdi32  '    C:\Users\Jeremy\AppData\Local\Temp/ccshbaaa.o:hello.c:(.text+0x59): undefined reference to `print_char'
collect2: ld returned 1 exit status
Failure!

Section Header
  + name := HELLO;

Section Public

  - main <-
  ( + a:INTEGER;
    a := 10;
  );

However, if you add any .print statement to your code then print_char is then included in your resulting .c file and no error exists. The above program changed to read:

Section Header
  + name := HELLO;

Section Public

  - main <-
  ( + a:INTEGER;
    a := 10;
    a.print;
  );

Works just fine. You will notice that I am compiling on Windows, however it is Lisaac 0.13.1 and the problem exists on OS X and Linux as well.

----------------------------------------------------------------------

You can respond by visiting: 
http://alioth.debian.org/tracker/?func=detail&atid=413092&aid=311020&group_id=100200



More information about the Lisaac-devel mailing list