打印
[技术求助]

请教问题:error: linking files for incompatible targets ??

[复制链接]
6015|5
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
robbins37|  楼主 | 2012-11-27 15:31 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我自己建了个工程,单个文件编译可以通过,但是链接后就出现:

[Linking...] \"d:\\ti\\c5500\\cgtools\\bin\\cl55\" -@\"Debug.lkf\"

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\csl5502x.lib\', member \'_csl_init.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\csl5502x.lib\', member \'csl.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\csl5502x.lib\', member \'csl_csldat.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\csl5502x.lib\', member \'i2c_read.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\csl5502x.lib\', member \'i2c_setup.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\csl5502x.lib\', member \'i2c_write.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\csl5502x.lib\', member \'irq_gdisab.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\csl5502x.lib\', member \'irq_grest.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\csl5502x.lib\', member \'pll_setfrq.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'divul.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'exit.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'printf.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'_lock.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'_printfi.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'atoi.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'cmpd.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'ctype.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'defs.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'divd.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'ecvt.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'fcvt.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'fixdi.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'fixdli.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'fltid.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'fltlid.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'fputc.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'fputs.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'frcdivd.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'llmpy.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'lowlev.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'ltoa.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'memccpy.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'memcpy.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'memory.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'mpyd.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'negd.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'remli.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'subd.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'trgdrv.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'trgmsg.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'_io_perm.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'addd.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'divli.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'fflush.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'frcmpyd.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'fseek.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'setvbuf.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'fopen.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'fclose.obj\')

>>   error: linking files for incompatible targets (library

            \'D:\\ti\\myprojects\\tuner1\\rts55x.lib\', member \'remove.obj\')





然后我就修改了build option 里的link order项。把所有的文件都添加到link order list里面。结果就只剩下两个错误(因为工程里有两个.c源文件,如果改成一个就只有一个错误):

[Linking...] \"d:\\ti\\c5500\\cgtools\\bin\\cl55\" -@\"Debug.lkf\"

>>   error: linking files for incompatible targets (file

            \'D:\\ti\\myprojects\\tuner1\\Debug\\TUNER.obj\')

>>   error: linking files for incompatible targets (file

            \'D:\\ti\\myprojects\\tuner1\\Debug\\tuner1.obj\')



这两个错误不知道该怎么解决,请指点,谢谢!

相关帖子

沙发
robbins37|  楼主 | 2012-11-27 15:41 | 只看该作者
坐等高人指点啊

使用特权

评论回复
板凳
dousfoulexd| | 2012-11-27 16:24 | 只看该作者
你编译器里面的存储器模式和你加入的库文件不一致。如果你加入的是一个大模式(如rts5509x)则你编译器选项下面ADVANCED栏就必须选择那个large memory mode选项。也就是要保证这两者一致

使用特权

评论回复
地板
dousfoulexd| | 2012-11-27 16:25 | 只看该作者
你建立。lib文件的条件要与现在的工程一样,检查一下build option。

使用特权

评论回复
5
njnh| | 2013-7-24 15:50 | 只看该作者
你最后那两个是怎么处理的啊?我也遇到了这样的问题。

使用特权

评论回复
6
zeluo| | 2013-7-25 18:23 | 只看该作者
有可能是库文件不匹配   楼主   你花点时间   好好看看  

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

10

主题

160

帖子

2

粉丝