http_fetcher編譯問題 - BBS
By Dorothy
at 2009-06-26T22:03
at 2009-06-26T22:03
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.
: 看起來是你的用法錯了
--
因此我用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.
: 看起來是你的用法錯了
--
Tags:
BBS
All Comments
Related Posts
請問一個問題
By Ivy
at 2009-06-24T17:32
at 2009-06-24T17:32
關於 Mail Server
By Wallis
at 2009-06-16T16:57
at 2009-06-16T16:57
側錄畫面
By Mia
at 2009-06-16T12:51
at 2009-06-16T12:51
ddclient如何設定開機自動執行?
By Leila
at 2009-06-15T20:49
at 2009-06-15T20:49
lighttpd + tomcat
By Frederic
at 2009-06-15T16:01
at 2009-06-15T16:01