Request for Help with Creating and using a Library in Keil

Hello everyone,

I am a beginner with Keil and am currently working on a project that I took over from a previous team. They created a library and included it in the project, but I believe there are some issues.

Specifically, there are files with the same names and variables in both the library and the project.

I would greatly appreciate any guidance on how to resolve this and properly manage the library within the project.

Thank you in advance for your help!

Parents
  • Hey there!

    It sounds like you’ve got a bit of a tricky situation with overlapping files and variables. One thing you could try is checking the file inclusion paths to make sure the project is not unintentionally pulling in both versions of the files. You might also want to rename the conflicting variables in either the library or the project to avoid collisions.

    Another approach is using namespaces or static variables if that's an option, to isolate them. And, if the library is something you can modify, consider refactoring it to avoid these kinds of conflicts in the future.

    Good luck with your project! Let me know if you need any more help!

Reply
  • Hey there!

    It sounds like you’ve got a bit of a tricky situation with overlapping files and variables. One thing you could try is checking the file inclusion paths to make sure the project is not unintentionally pulling in both versions of the files. You might also want to rename the conflicting variables in either the library or the project to avoid collisions.

    Another approach is using namespaces or static variables if that's an option, to isolate them. And, if the library is something you can modify, consider refactoring it to avoid these kinds of conflicts in the future.

    Good luck with your project! Let me know if you need any more help!

Children
No data