Re: [問題] http_fetcher編譯問題

看板FreeBSD作者 (Sam)時間16年前 (2009/06/26 22:03), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/4 (看更多)
哦,感謝,測試出來發現原來他的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. : 看起來是你的用法錯了 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.123.101.165
文章代碼(AID): #1AHDLFEH (FreeBSD)
文章代碼(AID): #1AHDLFEH (FreeBSD)