Your Ad Here
首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 操作系统 > Linux > gcc/g++: 连接到特定library
【标  题】:gcc/g++: 连接到特定library
【关键字】:gcc/g++,library
【来  源】:http://blog.csdn.net/antk119/archive/2006/11/14/1383320.aspx

gcc/g++: 连接到特定library

Your Ad Here
  • 5. 執行程式的問題
  • 5-7. 編譯程式時發現如 " /tmp/ccQrRIy4.o(.text+0x7): undefined reference to `SSL_library_init' " 之找不到某library提供之function的錯誤訊息。

    解答:
    編譯程式若需要連結到特定library需增加 -lLIBNAME 之參數。

    這裡以test.c需要使用到openssl之library為例:

    % gcc -o mytest test.c  /tmp/ccZJHPg1.o: In function `main':/tmp/ccZJHPg1.o(.text+0x7): undefined reference to `SSL_library_init'% gcc -o mytest -lssl -lcrypto test.c% ls -l mytest-rwxr-xr-x   1 nestlin  wheel        4320 May 12 09:33 mytest
linux系统命令:【上一篇】
软件移植通用规则(General Porting Rules):【下一篇】
【相关文章】
  • how to use shark library!
  • The Standard C Library -------------- 经典的基础
  • library(库)的定位和搜索路径
  • LoadLibrary(Ex)失败,GetLastError返回127 (找不到指定的程序)
  • Tomcat5.5启动时提示“The Apache Tomcat Native library which allows optimal performance in production...
  • Windows Vision Library是什么(WVL)?
  • Asp.ScriptLibrary.Record06
  • tomcat 5.5启动时出现The Apache Tomcat Native library which allows optimal performance 错误的解决方法
  • Enterprise Library 2.0 中文教程
  • Enterprise Library 2.0 Hands On Lab 翻译
  • 【随机文章】
  • c语言时间函数集
  • Oracle9i的优化调整
  • PowerDesinger 12.1.0.1913破解补丁
  • Caused by: java.sql.BatchUpdateException: ORA-0229
  • 忍痛揭露国内开源运动的黑幕
  • db2cmd里的内容如何记录下来?(续)
  • 获取硬盘型号与序列号
  • 结构体(含位域)的sizeof
  • 停止weblogic方法
  • 利用C++Builder在Windows“开始”按钮上绘图
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 bbb软讯网络 All Rigths Reserved.