LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 814|回复: 3

链接问题求助

[复制链接]
发表于 2007-6-13 00:36:23 | 显示全部楼层 |阅读模式
我最近在用一个线性运算的库spooles,按照说明make编译生成库文件libspooles.a,也没出什么错误,但是在链接程序的时候无论如何都无法成功,总是提示某函数为“未定义的引用”。用nm libspooles.a显示内容的片段如下
SemiImplMtx_IO.o:
         U fprintf
         U FrontMtx_writeForHumanEye
         U fwrite
         U InpMtx_writeForHumanEye
         U IV_writeForHumanEye
00000000 T SemiImplMtx_writeForHumanEye
         U stderr

SemiImplMtx_solve.o:
         U DenseMtx_copyRow
         U DenseMtx_free
         U DenseMtx_init
         U DenseMtx_new
         U DenseMtx_writeForHumanEye
         U DenseMtx_writeForMatlab
         U DVzero
         U fflush
         U fprintf
         U FrontMtx_solve
         U fwrite
         U gettimeofday
         U InpMtx_nonsym_mmm
         U InpMtx_nonsym_mmm_H
         U InpMtx_nonsym_mmm_T
         U IV_sizeAndEntries
00000000 T SemiImplMtx_solve
         U stderr
00000000 b TV
00000008 b TZ

SemiImplMtx_util.o:
         U FrontMtx_nSolveOps
         U fwrite
00000000 T SemiImplMtx_stats
         U stderr

SolveMap_basics.o:
         U exit
         U fprintf
         U free
         U IVfree
         U malloc
000000ed T SolveMap_clearData
0000019b T SolveMap_free
00000000 T SolveMap_new
00000062 T SolveMap_setDefaultFields
         U stderr

有哪位知道这可能是怎么回事吗
发表于 2007-6-13 10:49:02 | 显示全部楼层
在 configure spooles 的时候试试 --enable-shared
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-6-13 14:48:07 | 显示全部楼层
这个软件是直接make生成库文件的,没有configure
回复 支持 反对

使用道具 举报

发表于 2007-6-13 17:02:58 | 显示全部楼层
那就:
1. 直接改 Makefile 好了,让它动态编译
2. 或者是看看你的程序连接时“未定义的引用”是哪些库提供的,把这些库一起连接
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表