http_fetcher編譯問題 - BBS

Table of Contents

哦,感謝,測試出來發現原來他的lib是c語言寫出來的,

因此我用g++來編譯時就發生上述的問題,

不過我的測試檔換成.c檔後,

他出現另一個問題:

./a.out
/libexec/ld-elf.so.1: Shared object "libhttp_fetcher.so.2" not found, required
by "a.out"

我是不是能在編譯時加上什麼參數,來指定libhttp_fetcher.so.2的位置呢?

謝謝告知~

※ 引述《weiyucsie (選擇那刻 才算開始)》之銘言:
: 稍微下載測試後
: 發現http_fetch的prototype為
: int http_fetch(const char *url, char **fileBuf);
: 對照其comment
: Download the page, registering a hit. If you pass it a NULL for fileBuf,
: 'url' will be requested but will not remain in memory (useful for
: simply registering a hit). Otherwise necessary space will be allocated
: and will be pointed to by fileBuf. Note that a NULL byte is
: added to the data, so the actual buffer will be the file size + 1.
: 看起來是你的用法錯了

--

All Comments