>
>
> 1) Did you give the correct name ? 2) Is the current dir in the linker
> search path ? AFAIK the current dir is by default not in the linker search
> path.
>

I am sure the name is correct.  No matter I supply the linker path (-Fl.)
or not, it does not work (i.e. ld reported cannot find -lthostmduserapi)

How ever, I managed to compile it by doing the following:

1) rename thostmduserapi.so to libthostmduserapi.so
2) add the following into implementation section:
{$linklib thostmduserapi.so}
{$linklib ThostMdIntf.a}
{$linklib stdc++}
{$linklib gcc_s}
{$linklib c}
3) Compile the project with LD_RUN_PATH=.

However, my last question is: How can I instruct FPC to look for
thostmduserapi.so, NOT libthostmduserapi.so, i.e. WITHOUT the lib prefix?

I checked the ld man page, it said to put a colon prefix, to tell ld not to
prepend "lib".  I then did this:

{$linklib :thostmduserapi.so}

Unfortunately, ld still cannot find the library, however the error message
changed:

/usr/bin/ld: cannot find thostmduserapi

while using {$linklib thostmduserapi.so}, the error was:

/usr/bin/ld: cannot find -lthostmduserapi

How to let ld look for library WITHOUT lib prefix?

Thanks!
_______________________________________________
fpc-pascal maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to