<div dir="ltr">
<div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="im">
<br></div>
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.<br></blockquote><div><br></div><div><span style="font-family:courier new,monospace">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)</span><br>

<br></div><div><span style="font-family:courier new,monospace">How ever, I managed to compile it by doing the following:<br><br></span></div><div><span style="font-family:courier new,monospace">1) rename thostmduserapi.so to libthostmduserapi.so<br>

</span></div><div><span style="font-family:courier new,monospace">2) add the following into implementation section:<br></span><div style="margin-left:40px"><span style="font-family:courier new,monospace">{$linklib thostmduserapi.so}<br>

{$linklib ThostMdIntf.a}<br>{$linklib stdc++}<br>{$linklib gcc_s}<br>{$linklib c}<br></span></div><span style="font-family:courier new,monospace">3) Compile the project with LD_RUN_PATH=.<br><br></span></div><div><span style="font-family:courier new,monospace">However, my last question is: How can I instruct FPC to look for thostmduserapi.so, NOT libthostmduserapi.so, i.e. WITHOUT the lib prefix?<br>

<br></span></div><div><span style="font-family:courier new,monospace">I checked the ld man page, it said to put a colon prefix, to tell ld not to prepend "lib".  I then did this:<br><br>{$linklib :thostmduserapi.so}<br>

<br></span></div><div><span style="font-family:courier new,monospace">Unfortunately, ld still cannot find the library, however the error message changed:<br><br>/usr/bin/ld: cannot find thostmduserapi<br><br></span></div>

<div><span style="font-family:courier new,monospace">while </span><span style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">using {$linklib thostmduserapi.so}, the error </span>was: <br>

<br>/usr/bin/ld: cannot find -lthostmduserapi<br><br></span></div><div><span style="font-family:courier new,monospace">How to let ld look for library WITHOUT lib prefix?<br><br></span></div><div><span style="font-family:courier new,monospace">Thanks!<br>

</span></div><div><span style="font-family:courier new,monospace"><br></span></div></div></div></div>