[fpc-pascal]Need help on LinkLib

Andre Wohnig a.wohnig at thiesen.com
Thu Dec 7 14:23:08 CET 2000


Matt Emson wrote:

> If it were Delphi code, I'd say you were missing the reference to the library
> you were calling ibfind from (but then again I could be wrong)
>
> You'd need to find something in Free Pascal that does the same as:
>
> procedure DoSomething; external 'MYLIB.DLL';
> {this is straight out of Delphi's help, so it's not linux geared}
>
> Maybe (I am guessing here, so don't assume I know what I'm talking about)
>
> Function ibfind(name : PChar) : LongInt; cdecl; external "gpiblib.a";
> // or maybe
> //Function ibfind(name : PChar) : LongInt; cdecl; external "gpiblib";
>
> That would work in Object Pascal anyway.
>
> Hope that helps,
>
> Matt
>

Thanx a lot Matt!

This seems to be the right way. I changed the line to "Function ibfind(name
: PChar) : LongInt; cdecl; external ´gpiblib.a´  ". The "undefined" error don´t
appear annylonger. But now i get a lot of other errors like
"/usr/src/linux-gpib/lib/ibFind.c(36) Error: undefined reference to `getenv' ".
I think i have to set a path varable or something like that. Or must all the *.c
files in the same directory with my program (but i think this could not be the
answer)?
Any suggestions?

tia
  Andre´



--
Thiesen                           | André Wohnig
hardware- & software- design GmbH | a.wohnig at thiesen.com
Im Tiegel 9                       | www.thiesen.com
36367 Wartenberg                  | tel. +49 (0) 6641 979-142  fax -299







More information about the fpc-pascal mailing list