私はC.未定義の参照(C)
にカールを使用しようとしています私は、公式ページカール訪問し、サンプルソースコードをコピーしました。以下
リンクです:私はコマンド "gccのtest.cの" と、このコードを実行すると、コンソールには以下のようなメッセージが表示さ
、 http://curl.haxx.se/libcurl/c/sepheaders.html
。
/tmp/cc1vsivQ.o: In function `main':
test.c:(.text+0xe1): undefined reference to `curl_global_init'
test.c:(.text+0xe6): undefined reference to `curl_easy_init'
test.c:(.text+0x10c): undefined reference to `curl_easy_setopt'
test.c:(.text+0x12e): undefined reference to `curl_easy_setopt'
test.c:(.text+0x150): undefined reference to `curl_easy_setopt'
test.c:(.text+0x17e): undefined reference to `curl_easy_cleanup'
test.c:(.text+0x1b3): undefined reference to `curl_easy_cleanup'
test.c:(.text+0x1db): undefined reference to `curl_easy_setopt'
test.c:(.text+0x1e7): undefined reference to `curl_easy_perform'
test.c:(.text+0x1ff): undefined reference to `curl_easy_cleanup'
私はこれを解決する方法がわかりません。