Hello,
I am attempting to create "S.dll" using the
Borland C++ 5.5 compiler.
I use S-PLUS 6.0 and Windows XP. I will illustrate
my problem using the
simple C program "my_sin.c" found on page 650 of the
SPLUS-6
Programmer's Guide.
extern double
sin(double); /* line 1 */
__declspec(dllexport) /*
line 2 */
void my_sin(double
*x) /* line 3 */
{
/* line 4 */
*x =
sin(*x);
/* line 5 */
}
/* line 6 */
Line 2 has been added to the code because it is
required for exporting
the function my_sin.
From page 20 of the on-line complements to the
book "S Programming" by
Venables and Ripley, the appropriate commands to
create "S.dll" are
bcc32 -u- -6 -O2 -WDE
my_sin.c
ren my_sin.dll S.dll
I get the error message:
Unresolved external
'sin' referenced from C:\ProjectSin\my_sin.obj
In attempting to resolve this error, I have tried
numerous fixes and
revisions, but all these attempts were unsuccessful. From
this work,
my tentative conclusion is this:
If the C function to be exported
("my_sin" in my example) contains
a call to some OTHER C
function ("sin" in my example), then
difficulties will
occur.
Is this conclusion correct ? If so, is there
a work-around that will
solve the problem ? Any help will be greatly
appreciated.
Tom O'Malley
3410 Wooster Rd. #613
Rocky River OH 44116
Tel. 440-333-2870
Email omalleyta@cox.net