2025-04-28 10:22 AM
Hello,
I have downloaded a library containing two files: the .h file and the .c file:
I used drag and drop and dropped the folder into the driver folder of my project. I selected them to be a reference and a relative path.
Then I selected the compiler include path:
and the linker path
The IDE is showing the resource correctly linked to the project:
when I build the project I still get the error message:
What is wrong with my approach?
How do I set the paths correctly?
As a suggestion: I have found many users struggling with this. I would like to recommend a dialog for dropping a folder into the project with predefined links to the new folder.
Regards
Alexander
Solved! Go to Solution.
2025-04-28 10:41 AM - edited 2025-04-28 10:42 AM
It's in "<project>/Drivers/Si7021". Your paths assume it's in "<project>/Si7021".
To keep consistency, you could add "../Drivers/Si7021" as the path.
2025-04-28 10:41 AM - edited 2025-04-28 10:42 AM
It's in "<project>/Drivers/Si7021". Your paths assume it's in "<project>/Si7021".
To keep consistency, you could add "../Drivers/Si7021" as the path.
2025-04-28 10:45 AM
Unfortunately Eclipse is too complicated for beginners.
What you want here is "Build variables", not "linked resources".
Also, what you call a library is just an additional source file for the purpose of the project. So you don't add it to the libraries & library search path. Libraries are ".a" files.
2025-04-28 11:16 AM
Thank you very much!
Another issue was that I had an include "-l" which was expecting an archive.
Regards
Alexander