"_curl_easy_cleanup", referenced from:

昨天在运行cocos的test项目时碰到了这种情况,错误代码:

"_curl_easy_cleanup", referenced from:
CurlTest::ccTouchesEnded(cocos2d::CCSet*, cocos2d::CCEvent*) in CurlTest.o
cocos2d::extension::CURLRaii::~CURLRaii() in HttpClient.o
"_curl_easy_getinfo", referenced from:
cocos2d::extension::CURLRaii::perform(int*) in HttpClient.o
"_curl_easy_init", referenced from:
CurlTest::ccTouchesEnded(cocos2d::CCSet*, cocos2d::CCEvent*) in CurlTest.o
cocos2d::extension::CURLRaii::CURLRaii() in HttpClient.o
"_curl_easy_perform", referenced from:
CurlTest::ccTouchesEnded(cocos2d::CCSet*, cocos2d::CCEvent*) in CurlTest.o
cocos2d::extension::CURLRaii::perform(int*) in HttpClient.o
"_curl_easy_setopt", referenced from:
CurlTest::ccTouchesEnded(cocos2d::CCSet*, cocos2d::CCEvent*) in CurlTest.o
cocos2d::extension::configureCURL(void*) in HttpClient.o
bool cocos2d::extension::CURLRaii::setOption<char const*>(CURLoption, char const*) in HttpClient.o
bool cocos2d::extension::CURLRaii::setOption<bool>(CURLoption, bool) in HttpClient.o
bool cocos2d::extension::CURLRaii::setOption<curl_slist*>(CURLoption, curl_slist*) in HttpClient.o
bool cocos2d::extension::CURLRaii::setOption<unsigned long (*)(void*, unsigned long, unsigned long, void*)>(CURLoption, unsigned long (*)(void*, unsigned long, unsigned long, void*)) in HttpClient.o
bool cocos2d::extension::CURLRaii::setOption<void*>(CURLoption, void*) in HttpClient.o
"_curl_slist_append", referenced from:
cocos2d::extension::CURLRaii::init(cocos2d::extension::CCHttpRequest*, unsigned long (*)(void*, unsigned long, unsigned long, void*), void*, unsigned long (*)(void*, unsigned long, unsigned long, void*), void*) in HttpClient.o
"_curl_slist_free_all", referenced from:
cocos2d::extension::CURLRaii::~CURLRaii() in HttpClient.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)


然后发现是一个libcurl.a这个没有导入工程,导入即可

文件路径:

cocos2dx>>platform>>third_party>>ios>>libraries>>libcurl.a

因为我运行的是ios版本,所以选的是ios版本,其他的应该类似,我没有试验过

然后导入成功后即可运行成功

屏幕快照 2015-03-11 上午9.51.12.png


Last modification:January 1st, 1970 at 08:00 am
如果看了这个文章可以让你少加会班,可以请我喝杯可乐
已打赏名单
微信公众号

Leave a Comment