728x90
그냥 쉘에서는 curl이 사용이 되는데 코딩을 할려고하니 헤더파일을 못 찾는다.
yum install curl-devel
로 설치하자
설치하고 실행해보자
#include <curl/curl.h>
#include <stdio.h>
int main()
{
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://google.com");
/* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
/* Check for errors */
if(res != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
curl_easy_strerror(res));
/* always cleanup */
curl_easy_cleanup(curl);
}
return 0;
}
https://stackoverflow.com/questions/11471690/curl-h-no-such-file-or-directory/11471743
728x90
'개발 업무(코딩)-개발자였을때 썼던..' 카테고리의 다른 글
코스콤 koscom api 관련 문서와 링크 (0) | 2023.01.08 |
---|---|
curl 한글깨짐현상 + MemoryStruct(feat. koscom api) (0) | 2023.01.08 |
c(서버)와 java(클라이언트) socket 통신 간단 예제 (0) | 2023.01.08 |
자바(java)와 spring 설치 가이드 링크(링크 순서대로 깔면됩니다) (0) | 2023.01.08 |
pypy3 설치하는 방법 (0) | 2023.01.08 |