Page 2 of 2

Re: Library API file not found

Posted: Wed Mar 14, 2018 4:36 pm
by robertxmos
Hi alexjaw,
It looks like your code is not pulling in or declaring the necessary defines.
This is off the topic of the initial post.
You may like to try looking for other posts and documentation and then re-post under an appropriate title.
sorry
robert

Re: Library API file not found

Posted: Tue Jun 12, 2018 12:29 pm
by avrobot
I'm having similar issue with lib_i2c and robert you cut off alex here - do you have any idea what was going on with not having the defines pulled in? Could it be a compiler issue?

Re: Library API file not found

Posted: Tue Jun 12, 2018 1:19 pm
by robertxmos
It is hard for me to tell.

The compiler can only see what you give it.
The preprocessor is run first (makes one big file by concaternating the header files & replacing #defines and macros).
The result of this can be viewed by adding '-save-temps' to your build flags, and looking at the myfile.xi (or myfile.i etc) in the .build directory.
N.B. you may need to add this flag to your module (library) build info too.

The .xi file is then past to the compiler.
If any of the symbols are unknow, it will complain e.g. the preprocessor has not substituted a define (traditionally all capitals) with a value or symbol - because it is not told to.
There is nothing the compiler can do about this - you need to define these values, either in the Makefile (-D) or in a headerfile (#define).

I hope this helps and is not too basic - sorry.
robert