AnsweredAssumed Answered

linker errors "multiple defintion of" when migrating from KDS 2.0 to 3.1

Question asked by Michael Economides on Feb 16, 2016
Latest reply on Feb 23, 2016 by ZhangJennie

I had a project that built fine on KDS 2.0, but now that I have upgraded to KDS 3.1 I get the linker errors below.  I followed the migrating procedure (using the KDS Upgrade Assistant) as described here: Kinetis Design Studio: Migrating KDS V2.0.0 Projects to GNU Tools for ARM Embedded (Launchpad, KDS V3.0.0) 

 

I am building a Segger graphics library first (emWin_V528b), then linking to that library in my application (called A9950V0002).  Any help would be appreciated.

 

-Mike

 

**************************

 

'Building target: A9950V0002_dbg.elf'

'Invoking: Cross ARM C++ Linker'

arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections  -g3 -T "C:/Users/Mike/workspace.kds/A9950V0002/Project_Settings/Linker_Files/ProcessorExpert.ld" -Xlinker --gc-sections -L"C:/Users/Mike/workspace.kds/A9950V0002/Project_Settings/Linker_Files" -L"C:\Users\Mike\workspace.kds\emWin_V528b\Debug" -Wl,-Map,"A9950V0002_dbg.map" --specs=nano.specs -o "A9950V0002_dbg.elf" @ObjectList

c:/freescale/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg_s.a(lib_a-findfp.o): In function `_cleanup_r':

findfp.c:(.text._cleanup_r+0x0): multiple definition of `_cleanup_r'

C:/Freescale/KDS_2.0.0/toolchain/arm-none-eabi/lib/m4/fp/v4-sp-d16/libc.a(lib_a-findfp.o):(.text._cleanup_r+0x0): first defined here

c:/freescale/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg_s.a(lib_a-findfp.o): In function `__sfmoreglue':

findfp.c:(.text.__sfmoreglue+0x0): multiple definition of `__sfmoreglue'

C:/Freescale/KDS_2.0.0/toolchain/arm-none-eabi/lib/m4/fp/v4-sp-d16/libc.a(lib_a-findfp.o):(.text.__sfmoreglue+0x0): first defined here

c:/freescale/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg_s.a(lib_a-findfp.o): In function `_cleanup':

findfp.c:(.text._cleanup+0x0): multiple definition of `_cleanup'

C:/Freescale/KDS_2.0.0/toolchain/arm-none-eabi/lib/m4/fp/v4-sp-d16/libc.a(lib_a-findfp.o):(.text._cleanup+0x0): first defined here

c:/freescale/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg_s.a(lib_a-findfp.o): In function `__sinit':

findfp.c:(.text.__sinit+0x0): multiple definition of `__sinit'

C:/Freescale/KDS_2.0.0/toolchain/arm-none-eabi/lib/m4/fp/v4-sp-d16/libc.a(lib_a-findfp.o):(.text.__sinit+0x0): first defined here

c:/freescale/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg_s.a(lib_a-findfp.o): In function `__sfp':

findfp.c:(.text.__sfp+0x0): multiple definition of `__sfp'

C:/Freescale/KDS_2.0.0/toolchain/arm-none-eabi/lib/m4/fp/v4-sp-d16/libc.a(lib_a-findfp.o):(.text.__sfp+0x0): first defined here

c:/freescale/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg_s.a(lib_a-findfp.o): In function `__sfp_lock_acquire':

findfp.c:(.text.__sfp_lock_acquire+0x0): multiple definition of `__sfp_lock_acquire'

C:/Freescale/KDS_2.0.0/toolchain/arm-none-eabi/lib/m4/fp/v4-sp-d16/libc.a(lib_a-findfp.o):(.text.__sfp_lock_acquire+0x0): first defined here

c:/freescale/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg_s.a(lib_a-findfp.o): In function `__sfp_lock_release':

findfp.c:(.text.__sfp_lock_release+0x0): multiple definition of `__sfp_lock_release'

C:/Freescale/KDS_2.0.0/toolchain/arm-none-eabi/lib/m4/fp/v4-sp-d16/libc.a(lib_a-findfp.o):(.text.__sfp_lock_release+0x0): first defined here

c:/freescale/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg_s.a(lib_a-findfp.o): In function `__sinit_lock_acquire':

findfp.c:(.text.__sinit_lock_acquire+0x0): multiple definition of `__sinit_lock_acquire'

C:/Freescale/KDS_2.0.0/toolchain/arm-none-eabi/lib/m4/fp/v4-sp-d16/libc.a(lib_a-findfp.o):(.text.__sinit_lock_acquire+0x0): first defined here

c:/freescale/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg_s.a(lib_a-findfp.o): In function `__sinit_lock_release':

findfp.c:(.text.__sinit_lock_release+0x0): multiple definition of `__sinit_lock_release'

C:/Freescale/KDS_2.0.0/toolchain/arm-none-eabi/lib/m4/fp/v4-sp-d16/libc.a(lib_a-findfp.o):(.text.__sinit_lock_release+0x0): first defined here

c:/freescale/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg_s.a(lib_a-findfp.o): In function `__fp_lock_all':

findfp.c:(.text.__fp_lock_all+0x0): multiple definition of `__fp_lock_all'

C:/Freescale/KDS_2.0.0/toolchain/arm-none-eabi/lib/m4/fp/v4-sp-d16/libc.a(lib_a-findfp.o):(.text.__fp_lock_all+0x0): first defined here

c:/freescale/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg_s.a(lib_a-findfp.o): In function `__fp_unlock_all':

findfp.c:(.text.__fp_unlock_all+0x0): multiple definition of `__fp_unlock_all'

C:/Freescale/KDS_2.0.0/toolchain/arm-none-eabi/lib/m4/fp/v4-sp-d16/libc.a(lib_a-findfp.o):(.text.__fp_unlock_all+0x0): first defined here

collect2.exe: error: ld returned 1 exit status

make: *** [A9950V0002_dbg.elf] Error 1

Outcomes