http_fetcher編譯問題 - BBS
By Rae
at 2009-06-26T18:22
at 2009-06-26T18:22
Table of Contents
我自己寫了個.cpp,
自行指定安裝目錄(非預設目錄),
然而在寫測試程式編譯的時候有指定include dir和lib dir,
可是卻仍發生undefined reference問題(錯誤如下)
請問該如何解決?
謝謝告知~
g++ -I../include -L../lib -lhttp_fetcher t.cpp
/var/tmp//ccjBAMrM.o(.text+0x12b): In function `main':
: undefined reference to `http_fetch(char const*, char**)'
ls ../include/
http_error_codes.h http_fetcher.h
ls ../lib/
libhttp_fetcher.a libhttp_fetcher.la libhttp_fetcher.so libhttp
_fetcher.so.2
CODE:
#include <iostream>
#include "../include/http_fetcher.h"
using namespace std;
int main()
{
char *fileBuf[4000];
http_fetch("http://www.yahoo.com.tw", fileBuf);
return 0;
}
--
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