[C--] starting using qc--

Zorg 421 <[email protected]> Fri, 27 Mar 2009 21:10:01 +0100
Newsgroups gmane.comp.lang.c--
Message-ID <[email protected]>
Hello the list,

I'm trying learning using c-- and qc-- (on debian linux), I'm a bit
lost as the doc cover the c-- language really well but lacks some
starter for the environnment, que qc-- compiler, the building
scripts/options.

for example, the tail recursive example of the manual:

target byteorder little;
/* Tail recursion */
export sp2;
sp2( bits32 n ) {
    jump sp2_help( n, 1, 1 );
}
sp2_help( bits32 n, bits32 s, bits32 p ) {
    if n==1 {
        return( s, p );
    } else {
        jump sp2_help( n-1, s+n, p*n );
    }
}

$ qc--.opt tailrec.c--
/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
tailrec.o: In function `Cmm.ref_to_global_area':
(.data+0x0): undefined reference to `Cmm.globalsig.aQOYZWMPACZAJaMABGMOZeCCPY'
collect2: ld returned 1 exit status

I guess I need to export a main, which I think I can figure out myself
with the examples in test2/src, but about this Cmm.globalsig.XXX, what
is it?

TIA!
_______________________________________________
Cminusminus mailing list
[email protected]
https://www.eecs.harvard.edu/mailman/listinfo/cminusminus