0

I have an issue on gcc 9.3.1 version for ARM, my code have two file that object_1.c is empty file and for main.c as

unsigned char test = 100;
int main(void)
{
    /*Write code here*/
    test++;
    printf("Test lib");
    return 0;
}

my command when linking as the example:

<gcc_path>/bin/arm-none-eabi-ld.exe -L<gcc_path>/arm-none-eabi/lib -L<gcc_path>/lib/gcc/arm-none-eabi/9.3.1 -lc -lm -T linker.ld object_1.o main.o -o run.elf

I have tried some ideas but it is not work. Could anyone help me with some ideas?

user207421
  • 305,947
  • 44
  • 307
  • 483
Mike
  • 1
  • 1
  • Please expand and post more context. Please post the whole compiler error messages verbatim as they are. Does this answer your question: https://stackoverflow.com/questions/45135/why-does-the-order-in-which-libraries-are-linked-sometimes-cause-errors-in-gcc ? While at it, you might interest yourself in a build system that will take care of such stuff by itself, like `cmake`. – KamilCuk Jun 04 '21 at 07:09
  • Specifically the `.../` bit is either truncated or wrong. If that has been truncated, please post the uncensored version. –  Jun 04 '21 at 07:11
  • .../ it is example in my program it is the directory of compiler – Mike Jun 04 '21 at 07:16

0 Answers0