[C--] a skeleton file for qc-- to start?

Xingzhi Pan <[email protected]> Wed, 14 Oct 2009 22:26:54 +0800
Newsgroups gmane.comp.lang.c--
Message-ID <[email protected]>
Hi list,

I've built qc--20090627 on Debian and now I'm ready to try it out. However I
couldn't find a proper "skeleton" c-- source file to start with. The closest I
could get (modified from the document) is

    target byteorder little;
    section "text" {
        /* Ordinary recursion */
        export sp1;
        sp1( bits32 n ) {
          bits32 s, p;
          if n == 1 {
              return( 1, 1 );
          } else {
              s, p = sp1( n-1 );
              return( s+n, p*n );
          }
        }
        export main;
        main() {
            sp1( 3, 3 );
            return( 0 );
        }
    }

I used
    qc--.opt sp1.c--
and got
    sp1.o: In function `Cmm.ref_to_global_area':
    (.data+0x0): undefined reference to
`Cmm.globalsig.aQOYZWMPACZAJaMABGMOZeCCPY'
    collect2: ld returned 1 exit status

Can anyone point me to somewhere to start? Thanks in advance!

Another question: does "section" actually correspond to the same concept when
people talk about X86 assembly (.text, .data, .bss, etc.)?

PS, it's somewhat troublesome to build qc-- from scratch - partly because I
tried to do it on Cygwin first. After getting frustrated I turned to Debian.
But even then I had to build Lua 4, Ocaml 3.08 (these guys are a little big old
nowadays), install some Latex packages (not mentioned in the INSTALL file), and
modify the configure script. It took me a few hours to figure out everything
needed.

Cheers.

-- 
Pan, Xingzhi
http://www.panxingzhi.net
http://code.google.com/p/pypl0
http://code.google.com/p/dircompare/
_______________________________________________
Cminusminus mailing list
[email protected]
https://www.eecs.harvard.edu/mailman/listinfo/cminusminus