Hello all,
Is someone could help me about using C routines in pascal? I think I am close to the right solution but I can't manage to get it!...
So I will try to summurize all I made until now... At first, I have downloaded randlibc-1.3.tar.gz. After having unpacked this file, a randlib.c directory was created and it contains: HOWTOGET* README* doc/ src/ test/
In src, I have compiled com.c, linpack.c and randlib.c and put them in a library lirandlib.a Then, I have move librandlib.a into /usr/local/lib and randlib.h in /usr/local/include.
Actually, I would like to use a fonction named "genbet" in the randlib.c. For that, I have made a little program beta.pas:
unit beta; interface {$L /usr/local/include/randlib.h} function genbet(x,y:shortreal):shortreal;C; implementation end.
and test.pas: uses beta; begin writeln(genbet(100,150)); end.
When I compile the first one, the following message appears: Undefined first referenced symbol in file main /usr/local/lib/gcc-lib/sparc-sun-solaris2.7/ 2.95.2/crt1.o ld: fatal: Symbol referencing errors. No output written to beta collect2: ld returned 1 exit status
And for the second one: test.p:4: object file `/usr/local/include/randlib.o' not found test.p:4: object file `/usr/local/include/randlib.o' not found
"extern float genbet(float aa,float bb)" is in randlib.h and the program is written in randlib.c.
I really need your help,
Nathalie
________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com