Tuesday, 15 September 2015

[gccsdk] Undefined reference to main

> Looks like we're on the right track.

Yes, the interpreter now compiles. For making my sample plugin "riscos"
I am just using an Obeyfile with

dir <Obey$dir>
gcc -std=gnu99 -fPIC -O2 -Wall -Wextra -mfpu=vfp -DRISCOS -o so/riscos riscoslib.c sys.s -Wl,-E liblua

but when I run it I get (apart from a warning about a possibly uninitialized variable in
a switch statement - which is OK) the error

.... In function `crt1_data':
crt0.S:(.data+0x14): undefined reference to `main'
collect2: error: ld returned 1 exit status

I am evidently omitting some flag to say that it is supposed to be a plugin, without a
main function. There is no 'main' in riscoslib.c or sys.s or in any of the sources
that make liblua.

--
Gavin Wraith (gavin@wra1th.plus.com)
Home page: http://www.wra1th.plus.com/

_______________________________________________
GCCSDK mailing list gcc@gccsdk.riscos.info
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK

No comments:

Post a Comment