用TKStudio编译其自带的例子gcc_ucos\ucos.xmp工程,按照<<使用前请先读该文件readme.txt>>要求导入UCOS2.76,并更改相关头文件包含方式,编译顺利通过,但是产生一大堆链接错误,请问如何解决?
啥叫 "multiple definition of `osintenter'"?
明明osintenter这个函数就定义一次啊!
--------------------Configuration: C:\Program Files\Zhiyuan Electronic\TKStudio\Examples\armgcc\gcc_ucos\ucos.xmp - DebugRel--------------------
build target G++ Lite-DebugRel ...
Assembling crt0.S...
Compiling hal.c...
Compiling main.c...
Compiling os_core.c...
Assembling os_cpu_a.s...
Compiling os_cpu_c.c...
Compiling os_flag.c...
Compiling os_mbox.c...
Compiling os_mem.c...
Compiling os_mutex.c...
Compiling os_q.c...
Compiling os_sem.c...
Compiling os_task.c...
Compiling os_time.c...
Compiling target.c...
Compiling ucos_ii.c...
Linking...
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `osintenter':
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(301):error: multiple definition of `osintenter'
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\os_core.o:c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(301):error: first defined here
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `osversion':
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(625):error: multiple definition of `osversion'
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\os_core.o:c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(625):error: first defined here
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `os_eventtaskrdy':
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(670):error: multiple definition of `os_eventtaskrdy'
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\os_core.o:c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(670):error: first defined here
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `os_eventtaskwait':
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(722):error: multiple definition of `os_eventtaskwait'
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\os_core.o:c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(722):error: first defined here
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `os_eventto':
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(757):error: multiple definition of `os_eventto'
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\os_core.o:c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(757):error: first defined here
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `os_eventwaitlistinit':
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(787):error: multiple definition of `os_eventwaitlistinit'
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\os_core.o:c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(787):error: first defined here
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `os_memclr':
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(1116):error: multiple definition of `os_memclr'
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\os_core.o:c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(1116):error: first defined here
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `os_memcopy':
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(1148):error: multiple definition of `os_memcopy'
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\os_core.o:c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(1148):error: first defined here
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `os_strcopy':
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(1221):error: multiple definition of `os_strcopy'
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\os_core.o:c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(1221):error: first defined here
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `os_strlen':
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(1258):error: multiple definition of `os_strlen'
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\os_core.o:c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(1258):error: first defined here
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `ostasknameset':
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_task.c(655):error: multiple definition of `ostasknameset'
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\os_task.o:c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_task.c(655):error: first defined here
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `ostasknameget':
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_task.c(583):error: multiple definition of `ostasknameget'
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\os_task.o:c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_task.c(583):error: first defined here
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `ossemcreate':
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_sem.c(87):error: multiple definition of `ossemcreate'
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\os_sem.o:c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_sem.c(87):error: first defined here
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `ostimetick':
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(538):error: multiple definition of `ostimetick'
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\os_core.o:c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(538):error: first defined here
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `oseventnameset':
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(174):error: multiple definition of `oseventnameset'
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\os_core.o:c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(174):error: first defined here
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `oseventnameget':
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(104):error: multiple definition of `oseventnameget'
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\os_core.o:c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(104):error: first defined here
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `os_tcbinit':
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(1459):error: multiple definition of `os_tcbinit'
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\os_core.o:c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(1459):error: first defined here
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `os_taskidle':
.................................................. |