Library API file not found

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
XCore Addict
Posts: 169
Joined: Fri Oct 23, 2015 10:23 am

Re: Library API file not found

Postby robertxmos » Wed Mar 14, 2018 4:36 pm

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.
Posts: 10
Joined: Mon Jun 04, 2018 4:26 am

Postby avrobot » Tue Jun 12, 2018 12:29 pm

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

Postby robertxmos » Tue Jun 12, 2018 1:19 pm

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.

Who is online

Users browsing this forum: No registered users and 61 guests