惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

罗磊的独立博客
Google DeepMind News
Google DeepMind News
MyScale Blog
MyScale Blog
A
About on SuperTechFans
Martin Fowler
Martin Fowler
M
MIT News - Artificial intelligence
Recent Announcements
Recent Announcements
D
DataBreaches.Net
B
Blog
博客园 - 【当耐特】
爱范儿
爱范儿
有赞技术团队
有赞技术团队
P
Proofpoint News Feed
WordPress大学
WordPress大学
小众软件
小众软件
Apple Machine Learning Research
Apple Machine Learning Research
I
InfoQ
Engineering at Meta
Engineering at Meta
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Last Week in AI
Last Week in AI
Microsoft Azure Blog
Microsoft Azure Blog
雷峰网
雷峰网
量子位
G
Google Developers Blog

博客园 - flyingchen

敏捷项目组 javascript string to date - flyingchen 熟悉了以下VIM指令,你会爱死她的 ajax应用如何做好seo - flyingchen - 博客园 nestful - ruby http-rest 客户端 分析 Liskov替换原则与继承 Linux Commands Cannot find autoconf. Please check your autoconf installation pecl报错(1) - flyingchen - 博客园 关于角色访问控制(RBAC) post xml 通过 simplexml_load_string 解析问题 - flyingchen awk学习 php实现单件模式总结(持续更新) 激动网 PHP高级开发工程师 招聘 rsync的命令格式 rsync从linux到linux的文件同步备份 zend + apache + config stop words mmseg 安装错误 error: ’strncmp’ was not declared in this scope
gcc的一个困惑
flyingchen · 2011-10-26 · via 博客园 - flyingchen

写了段简单的c代码,调用libcurl。网上有很多的例子,代码不提了。关键问题出在了gcc编译时。

网络上流传的编译方式是gcc -lcurl curl_test.c; 以此方法,我的编译总是"undefined reference to `curl_easy_init'",

非常奇怪,大多同行遇到此问题时,是因为-lcurl没有加,造成无法找到curl库。我这里加上,也依然报同样的错误。

最后无意见发现gcc curl_test.c -lcurl;竟然ok了。我是ubuntu11.10系统,gcc版本是4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3) 。