We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, Does anyone know how to avoid linker ignores undefined symbols? My problem is that, when the first time you do the rebuild all, the compiler can know there are undefined symbol, but if you build (i.e. link, not build all) the project, the linker can link it without errors nor warnings. I don't want this potential issues. Thank you, Snaku
it is not a 100% clear to me what the problem is, but try to link with --keep flag, for example:
--keep FIRMWARE_TO_APP_RTX_SIGNAL_ROUTE.o(*)
Hi Tamir Michael,
Sorry, I did not describe the problem clearly. I write a example code to explain my problem. This example code is no problem when you compile it, but if you change the 'ITEM_2' to 'ITEM_foo' in the test.h, and use 'build target' this protect again (not rebuild all), the compiler will not tell you any thing wrong, only use 'rebuild all' can detect the undefined symbol. My question is that how to avoid this potential issue when you use 'build target'.
file: test.h
enum{ ITEM_1, ITEM_3 };
file: test.c
#include "test.h" #include <stdio.h> int main(void) { printf("ITEM 1 = %d",ITEM_1); printf("ITEM 2 = %d",ITEM_2); }
Thank you, Snaku
sorry, the 'test.h' in last message should be
enum{ ITEM_1, ITEM_2 };
They are Keil tools, aren't they?
Please give version numbers.
Hi Andy Neil, Yes, I am using Keil RealView MDK-ARM Version 3.50. Thank you, Snaku