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
Library API file not found
-
- XCore Addict
- Posts: 169
- Joined: Fri Oct 23, 2015 10:23 am
-
- Member++
- Posts: 17
- Joined: Mon Jun 04, 2018 4:26 am
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?
-
- XCore Addict
- Posts: 169
- Joined: Fri Oct 23, 2015 10:23 am
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
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