curl.h的头文件Eclipse中出现语法错误,求帮助!

我不得踢噶 2014-07-16 02:23:20
eclipse可以像VS那样设置一些预定义环境吗?怎么设置,谢谢!
如题。
我有一段.c的代码,我想用jni使它在手机上跑起来,我将Applicatiion.mk和Android.mk还有一些头文件都弄好了之后build project之后出错了。
E:/AndroidCode/HelloJNI//jni/multi-gcd.c:84: error: undefined reference to 'curl_multi_socket_action'
E:/AndroidCode/HelloJNI//jni/multi-gcd.c:86: error: undefined reference to 'curl_multi_info_read'
E:/AndroidCode/HelloJNI//jni/multi-gcd.c:91: error: undefined reference to 'curl_easy_getinfo'
E:/AndroidCode/HelloJNI//jni/multi-gcd.c:93: error: undefined reference to 'curl_easy_strerror'
E:/AndroidCode/HelloJNI//jni/multi-gcd.c:95: error: undefined reference to 'curl_multi_remove_handle'
E:/AndroidCode/HelloJNI//jni/multi-gcd.c:96: error: undefined reference to 'curl_easy_cleanup'
E:/AndroidCode/HelloJNI//jni/multi-gcd.c:86: error: undefined reference to 'curl_multi_info_read'
E:/AndroidCode/HelloJNI//jni/multi-gcd.c:132: error: undefined reference to 'curl_multi_cleanup'
E:/AndroidCode/HelloJNI//jni/multi-gcd.c:160: error: undefined reference to 'curl_multi_assign'
E:/AndroidCode/HelloJNI//jni/multi-gcd.c:176: error: undefined reference to 'curl_multi_assign'
E:/AndroidCode/HelloJNI//jni/multi-gcd.c:202: error: undefined reference to 'curl_easy_init'
E:/AndroidCode/HelloJNI//jni/multi-gcd.c:203: error: undefined reference to 'curl_easy_setopt'
E:/AndroidCode/HelloJNI//jni/multi-gcd.c:204: error: undefined reference to 'curl_easy_setopt'
E:/AndroidCode/HelloJNI//jni/multi-gcd.c:205: error: undefined reference to 'curl_easy_setopt'
E:/AndroidCode/HelloJNI//jni/multi-gcd.c:208: error: undefined reference to 'curl_multi_add_handle'
E:/AndroidCode/HelloJNI//jni/multi-gcd.c:222: error: undefined reference to 'curl_global_init'
E:/AndroidCode/HelloJNI//jni/multi-gcd.c:229: error: undefined reference to 'curl_multi_init'
E:/AndroidCode/HelloJNI//jni/multi-gcd.c:230: error: undefined reference to 'curl_multi_setopt'
E:/AndroidCode/HelloJNI//jni/multi-gcd.c:231: error: undefined reference to 'curl_multi_setopt'
clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
make.exe: *** [E:/AndroidCode/HelloJNI//obj/local/armeabi-v7a/libhello.so] Error 1


各种找不到头文件,然后我去curl.h的头文件里看了下,发现#ifdef __cplusplus预定义判断之后所有的代码都语法错误了。
如图:

我就说.c文件中的那些接口为什么没有定义了。但是我不知道从何下手,求指教!
...全文
286 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
我不得踢噶 2014-07-16
  • 打赏
  • 举报
回复
有人见过这样的问题吗?

80,351

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧