Hi,
I am working on ATV2 app and related libs and examples, for example, I need to edit aws_iot.c but I don't want to affect all nrf aws_iot.c lib examples and projects, I just want to apply these changes to my local project to work on some other projects with default libs and configs later, So I copied aws_iot.c to the local project folder and compiled it. but as you guess, I am getting "multiple definition errors" like this below. It is the same error when I want to copy and edit Kconfig files as well.
c:/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.exe: modules/nrf/subsys/net/lib/aws_iot/lib..__nrf__subsys__net__lib__aws_iot.a(aws_iot.c.obj):C:\ncs\v2.2.0\nrf\subsys\net\lib\aws_iot\src\aws_iot.c:22: multiple definition of `log_const_aws_iot'; app/libapp.a(aws_iot.c.obj):C:\wsc\iotpass\IoTPass\board-test\src\cloud\cloud_codec\aws_iot\aws_iot.c:22: first defined here c:/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.exe: modules/nrf/subsys/net/lib/aws_iot/lib..__nrf__subsys__net__lib__aws_iot.a(aws_iot.c.obj): in function `aws_iot_ping': C:\ncs\v2.2.0\nrf\subsys\net\lib\aws_iot\src\aws_iot.c:924: multiple definition of `aws_iot_ping'; app/libapp.a(aws_iot.c.obj):C:\wsc\iotpass\IoTPass\board-test\src\cloud\cloud_codec\aws_iot\aws_iot.c:924: first defined here c:/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.exe: modules/nrf/subsys/net/lib/aws_iot/lib..__nrf__subsys__net__lib__aws_iot.a(aws_iot.c.obj): in function `aws_iot_keepalive_time_left': C:\ncs\v2.2.0\nrf\subsys\net\lib\aws_iot\src\aws_iot.c:933: multiple definition of `aws_iot_keepalive_time_left'; app/libapp.a(aws_iot.c.obj):C:\wsc\iotpass\IoTPass\board-test\src\cloud\cloud_codec\aws_iot\aws_iot.c:933: first defined here c:/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.exe: modules/nrf/subsys/net/lib/aws_iot/lib..__nrf__subsys__net__lib__aws_iot.a(aws_iot.c.obj): in function `aws_iot_input': C:\ncs\v2.2.0\nrf\subsys\net\lib\aws_iot\src\aws_iot.c:938: multiple definition of `aws_iot_input'; app/libapp.a(aws_iot.c.obj):C:\wsc\iotpass\IoTPass\board-test\src\cloud\cloud_codec\aws_iot\aws_iot.c:938: first defined here c:/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.exe: modules/nrf/subsys/net/lib/aws_iot/lib..__nrf__subsys__net__lib__aws_iot.a(aws_iot.c.obj): in function `aws_iot_send': C:\ncs\v2.2.0\nrf\subsys\net\lib\aws_iot\src\aws_iot.c:942: multiple definition of `aws_iot_send'; app/libapp.a(aws_iot.c.obj):C:\wsc\iotpass\IoTPass\board-test\src\cloud\cloud_codec\aws_iot\aws_iot.c:942: first defined here c:/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.exe: modules/nrf/subsys/net/lib/aws_iot/lib..__nrf__subsys__net__lib__aws_iot.a(aws_iot.c.obj): in function `aws_iot_disconnect':
is there any option to eliminate including sdk libs and configs during compiling to prevent conflicts between zephyrOs libs examples and my project? or Do I have to change the names of the files and functions? I remember when I was working on IAR, eclipse ide, I can add/remove lib paths.