This article is from the FAQ, by with numerous contributions by others.
Question:
I experience errors from the linker concerning undefined entries, and I am
sure that all of my slots are bound. What is wrong?
Answer:
You may have encountered a situation where the internal import tables of the
compiler gets confused because two of your slots have identical names.
Consider:
main.bet:
ORIGIN '~beta/basiclib/v1.6/betaenv';
INCLUDE 'foo';
--PROGRAM: descriptor--
(#
do foo
#)
foo.bet:
ORIGIN '~beta/basiclib/v1.6/betaenv';
BODY 'foobody';
-- LIB: attributes --
foo:
(# size: (# s: @integer <<SLOT size:dopart>> exit s #);
do size -> putint; newline;
#)
foobody.bet:
ORIGIN 'foo';
INCLUDE 'bar';
-- size: dopart --
do (&bar[]).size -> s
bar.bet:
ORIGIN '~beta/basiclib/v1.6/betaenv';
BODY 'barbody';
--LIB: attributes--
bar:
(# size: (# s: @integer <<SLOT size:dopart>> exit s #)#);
barbody.bet:
ORIGIN 'bar'
-- size: dopart --
do 1 -> s
 
Continue to: