萍聚社区-德国热线-德国实用信息网

 找回密码
 注册

微信登录

微信扫一扫,快速登录

萍聚头条

查看: 631|回复: 1

[求助] 于c 语言里头联合编译gsl 和 R_ext 函数库的问题

[复制链接]
发表于 2009-9-15 10:45 | 显示全部楼层 |阅读模式
专业问题讨论
有效期至:
专业:

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册 微信登录

x
本帖最后由 orionsnow 于 2009-9-15 10:47 编辑

我用的gcc

命令 gcc -static example.o -lgsl -lgslcblas -lm

单独编译  这两个库的小程序都通过了,联合编译我同事写的大程序的时候就出问题了

我记的好像linux 下边写的程序拿到window 下边来编译会有些问题

不过两年前的事情,现在不确定了。 有没有高手指点下

或者谁知道比较好的这方面的bbs?

> gcc -static Zufallszahlen.o -lgsl -lgslcblas -lm
> Zufallszahlen.o:Zufallszahlen.c:(.text+0xd): undefined reference to  
> `_ltolower'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x20): undefined reference to  
> `_ltoupper'
>
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x3b): undefined reference to  
> `_ltowlower
> '
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x59): undefined reference to  
> `_ltowupper
> '
> Zufallszahlen.o:Zufallszahlen.c:(.text+0xbc): undefined reference to  
> `Rprintf'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x2c1): undefined reference  
> to `Rprintf'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x3d8): undefined reference  
> to `Rf_allocM
> atrix'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x3e6): undefined reference  
> to `Rf_protec
> t'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x3fa): undefined reference  
> to `Rf_allocV
> ector'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x408): undefined reference  
> to `Rf_protec
> t'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x413): undefined reference  
> to `INTEGER'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x427): undefined reference  
> to `INTEGER'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x436): undefined reference  
> to `_imp__R_D
> imSymbol'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x44e): undefined reference  
> to `Rf_setAtt
> rib'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x462): undefined reference  
> to `Rf_allocV
> ector'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x470): undefined reference  
> to `Rf_protec
> t'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x485): undefined reference  
> to `Rf_allocV
> ector'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x493): undefined reference  
> to `Rf_protec
> t'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x4a8): undefined reference  
> to `Rf_allocV
> ector'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x4b6): undefined reference  
> to `Rf_protec
> t'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x4ca): undefined reference to `REAL'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x507): undefined reference  
> to `Rf_unprot
> ect'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x536): undefined reference  
> to `Rf_allocM
> atrix'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x544): undefined reference  
> to `Rf_protec
> t'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x558): undefined reference  
> to `Rf_allocV
> ector'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x566): undefined reference  
> to `Rf_protec
> t'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x571): undefined reference  
> to `INTEGER'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x585): undefined reference  
> to `INTEGER'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x594): undefined reference  
> to `_imp__R_D
> imSymbol'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x5ac): undefined reference  
> to `Rf_setAtt
> rib'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x5c0): undefined reference  
> to `Rf_allocV
> ector'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x5ce): undefined reference  
> to `Rf_protec
> t'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x5e3): undefined reference  
> to `Rf_allocV
> ector'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x5f1): undefined reference  
> to `Rf_protec
> t'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x606): undefined reference  
> to `Rf_allocV
> ector'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x614): undefined reference  
> to `Rf_protec
> t'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x628): undefined reference to `REAL'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x665): undefined reference  
> to `Rf_unprot
> ect'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x694): undefined reference  
> to `Rf_allocM
> atrix'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x6a2): undefined reference  
> to `Rf_protec
> t'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x6b6): undefined reference  
> to `Rf_allocV
> ector'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x6c4): undefined reference  
> to `Rf_protec
> t'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x6cf): undefined reference  
> to `INTEGER'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x6e3): undefined reference  
> to `INTEGER'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x6f2): undefined reference  
> to `_imp__R_D
> imSymbol'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x70a): undefined reference  
> to `Rf_setAtt
> rib'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x71e): undefined reference  
> to `Rf_allocV
> ector'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x72c): undefined reference  
> to `Rf_protec
> t'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x741): undefined reference  
> to `Rf_allocV
> ector'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x74f): undefined reference  
> to `Rf_protec
> t'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x764): undefined reference  
> to `Rf_allocV
> ector'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x772): undefined reference  
> to `Rf_protec
> t'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x786): undefined reference to `REAL'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x7c3): undefined reference  
> to `Rf_unprot
> ect'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x7f2): undefined reference  
> to `Rf_allocM
> atrix'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x800): undefined reference  
> to `Rf_protec
> t'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x814): undefined reference  
> to `Rf_allocV
> ector'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x822): undefined reference  
> to `Rf_protec
> t'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x82d): undefined reference  
> to `INTEGER'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x841): undefined reference  
> to `INTEGER'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x850): undefined reference  
> to `_imp__R_D
> imSymbol'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x868): undefined reference  
> to `Rf_setAtt
> rib'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x87c): undefined reference  
> to `Rf_allocV
> ector'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x88a): undefined reference  
> to `Rf_protec
> t'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x89f): undefined reference  
> to `Rf_allocV
> ector'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x8ad): undefined reference  
> to `Rf_protec
> t'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x8c2): undefined reference  
> to `Rf_allocV
> ector'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x8d0): undefined reference  
> to `Rf_protec
> t'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x8e4): undefined reference to `REAL'
> Zufallszahlen.o:Zufallszahlen.c:(.text+0x921): undefined reference  
> to `Rf_unprot
> ect'
> k:/programme/r/rtools/mingw/bin/../lib/gcc/mingw32/4.2.1-sjlj/../../..\libmingw3
> 2.a(main.o):main.c:(.text+0x104): undefined reference to `WinMain@16'
> collect2: ld returned 1 exit status

评分

1

查看全部评分

Die von den Nutzern eingestellten Information und Meinungen sind nicht eigene Informationen und Meinungen der DOLC GmbH.
您需要登录后才可以回帖 登录 | 注册 微信登录

本版积分规则

手机版|Archiver|AGB|Impressum|Datenschutzerklärung|萍聚社区-德国热线-德国实用信息网 |网站地图

GMT+2, 2024-5-13 20:37 , Processed in 0.056052 second(s), 24 queries , MemCached On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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