This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Two files with the same name -> compile error

Project has two files with the same name "timers.c". One is from LwIP and another from FreeRTOS. Compilier returns warning and errors.

Warning: L6304W: Duplicate input file .\debug\timers.o ignored.
Error: L6218E: Undefined symbol sys_timeouts_mbox_fetch (referred from tcpip.o).
Error: L6218E: Undefined symbol sys_timeouts_init (referred from init.o).
Error: L6218E: Undefined symbol tcp_timer_needed (referred from tcp.o).


My solution is to rename one of files. But it is a bad practice since third-party libs should be unchanged.
Is there way to change output name for only file?

Parents
  • Sorry, I don't think there is a simple work-around for this. What happens if you build one of the above libraries separately, and just link your project with the library file?

    This is a situation where Keil still suffers from their herritage. In the 8051 world, few people bought libraries, and most projects was small with a quite limited number of source files.

    But many of todays ARM microcontrollers are more similar to the Intel i486 processor - a processor that when introduced was much used in very expensive corporate servers.

    Keil really should start to produce a full output directory tree to avoid object file name collisions.

Reply
  • Sorry, I don't think there is a simple work-around for this. What happens if you build one of the above libraries separately, and just link your project with the library file?

    This is a situation where Keil still suffers from their herritage. In the 8051 world, few people bought libraries, and most projects was small with a quite limited number of source files.

    But many of todays ARM microcontrollers are more similar to the Intel i486 processor - a processor that when introduced was much used in very expensive corporate servers.

    Keil really should start to produce a full output directory tree to avoid object file name collisions.

Children