Handbook
Glossary
check-dlsym ( symbol library/f -- )
Vocabulary
compiler
.
cfg
.
builder
.
alien
Inputs
symbol
a
string
library/f
a
library
or
f
Outputs
None
Word description
Checks that a symbol with the given name exists in the given library. Adds an error to the
linkage-errors
hash if not.
Definition
USING:
accessors
alien.libraries
alien.strings
combinators
compiler.cfg
compiler.errors
kernel
namespaces
;
IN:
compiler.cfg.builder.alien
:
check-dlsym
( symbol library/f -- )
{
{
[
dup
library-dll
dll-valid?
not
]
[
[
library-dll
dll-path
]
[
dlerror>>
]
bi
cfg
get
word>>
no-such-library-error
drop
]
}
{
[
2dup
library-dll
dlsym
not
]
[
drop
dlerror
cfg
get
word>>
no-such-symbol-error
]
}
[
2drop
]
}
cond
;