Thanks to all who responded. I really appreciate it.
> If the C function you are trying to link is relatively short,
> perhaps you could post it for a little more concrete discussion.
Here's is a sample of the code that I'm trying to linked together. This
is a much samplified code of what I'm trying to do. I was finally able
to link it successfuly (Thanks to Mark). But, the EXE file still doesn't run
correctly, if it runs at all. (At least I got something :->)
--- CLIPTEST.PRG ------------------
? "Test"
a = "123"
b = the_mem()
? a, b
return
---- CTEST.C ------------------------
#include "d:nandef.h"
#include "d:extend.h"
#include <dos.h>
CLIPPER the_mem()
{
union REGS r;
int amem;
int86(0x12, &r, &r);
amem=r.x.ax;
printf("Result:%d\n",amem);
_retni(amem);
}
----------------------------------
Here's how I compile and linked it: Notes that I'm using TurboC v.2.0
and Clipper Summer 87.
tcc -c -f- -ml -N- ctest.c
clipper cliptest.prg -l -m
tlink ctest.obj cliptest.obj,,,clipper+extend+cl.lib
It did compile and linked fine, but the program either doesn't work,
prints wrong results, and/or prints garbage and runtime error message.
What gives?
Thanks again,
Regards,
--
-tanu-
CSULB LIB LAB
--
-tanu-
CSULB LIB LAB
--
-tanu-
CSULB LIB LAB