cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4

alkhc_3773311
New Contributor

Hello everyone,

I'm trying to combine 3 aspects from different example projects into one  project. - RGB control - Battery level measurement - Temperature simulation

When I try to build the project and error message is displayed, stating that the main.h file can't be found. I don't know why this error is being shown.

I've attached my project to this post. If anyone could help me out with this problem I'd be really grateful, Thanks.

Kind regards,

Alisha Khan

0 Likes
1 Solution
AnkitaS_51
Employee

Hello Alisha,

If you want to add any file in a project in Creator which is  at a path  outside .cydsn project folder then add the path of that file  in Build settings>Compiler>General>Additional Include Directories.

Follow these steps then:

>>Right click the main.h file with question mark and exclude it

>>Next, include it again by right clicking the Header files and choosing Add >Existing Item option.

I did so and I was able to clear that build error associated with main.h being missing.

But certain other errors are there in the project which are related to undeclared variables.

Thanks,

Ankita

View solution in original post

0 Likes
1 Reply
AnkitaS_51
Employee

Hello Alisha,

If you want to add any file in a project in Creator which is  at a path  outside .cydsn project folder then add the path of that file  in Build settings>Compiler>General>Additional Include Directories.

Follow these steps then:

>>Right click the main.h file with question mark and exclude it

>>Next, include it again by right clicking the Header files and choosing Add >Existing Item option.

I did so and I was able to clear that build error associated with main.h being missing.

But certain other errors are there in the project which are related to undeclared variables.

Thanks,

Ankita

View solution in original post

0 Likes