Re: Scriptbasic - Compiling the generated C code



On Fri, 01 Feb 2008 23:08:06 GMT Mark Hobley <markhobley@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

| Has anyone had any success compiling C code generated by scriptbasic?
|
| I have created a simple "hello world" program
| hello.bas as follows:
|
| #!/usr/bin/scriba
| print "Hello World!"
|
| I now compile this into a C program:
|
| scriba -nCo hello.c hello.bas

What is "scriba"? I'm too lazy to go Google so I assume it is some program
to translate BASIC to C as your example suggests.


| I now want to compile the C program into a stand alone
| executable hello:
|
| gcc -o hello hello.c /usr/lib/scriba/lscriba.a
|
| This produces the following output:
|
| hello.c:27:25: warning: no newline at end of file
| /tmp/ccCqZJQL.o: In function `main':
| hello.c:(.text+0x25): undefined reference to
| `stndlone'
| collect2: ld returned 1 exit status
|
| I also tried this with Tiny C compiler, and got
| similar errors:
|
| tcc -o hello hello.c /usr/lib/scriba/lscriba.a
| tcc: undefined symbol 'stndlone'

It seems "scriba" produces some bad code. Find a support area for "scriba"
and ask about that.

--
|---------------------------------------/----------------------------------|
| Phil Howard KA9WGN (ka9wgn.ham.org) / Do not send to the address below |
| first name lower case at ipal.net / spamtrap-2008-02-02-0754@xxxxxxxx |
|------------------------------------/-------------------------------------|
.



Relevant Pages

  • Re: Prolog & C linking Problem
    ... >> I am trying to compile Prolog and C using plld. ... PL_initialise_ is an undefined reference ...
    (comp.lang.prolog)
  • Re: error message while compiling engdemo.c
    ... As I have never done it before, I try to compile examples given on the matlab documentation: ... engdemo.c:: undefined reference to `engPutVariable' ... engdemo.c:: undefined reference to `engEvalString' ... For Fortran, follow similar steps as above but select the Fortran compiler and use the appropriate Fortran engmatopts.bat file. ...
    (comp.soft-sys.matlab)
  • How can I compile PF without option PFIL_HOOKS defined in the kernel conf file?
    ... kernel conf file to try to get PF compile into the kernel, ... PF failed to compile; ... : undefined reference to `pfil_head_get' ... Will this fix the problem? ...
    (comp.unix.bsd.openbsd.misc)
  • gprof
    ... I'm trying to compile my C application with gprof but it is not working. ... This is a multithreaded program that use mysql and openssl libraries. ... /lib/libcrypto.so.4: undefined reference to `sysconf' ...
    (freebsd-questions)
  • Re: gprof
    ... I'm trying to compile my C application with gprof but it is not working.. ... This is a multithreaded program that use mysql and openssl libraries. ... /lib/libcrypto.so.4: undefined reference to `sysconf' ...
    (freebsd-questions)