Hi Guys,
i need a help.
I do make a MPLAP Projekt transfer to FC.
In the main.c there are defines for variable, struct and others.
The main.h have declaration of prototypes .
Example - functions are in button.c the declaration of prototypes in button.h
..
if i make a Makro of the function with c icon, the compiler do not know how the prototypes are define..
so i make a first c icon with #include "c:\extern\button.h" in the Makro and then is ok.
but this makro is only one function of the button.c.
so i make a new makro for the next function and again, a c icon for the #include "c:\extern\button.h".
the next, if i need a return from this function in the c icon in a makro,
how can i point to this return?
i can make a variable in FC, and in the makro in c icon i can define this to the FC Variable..
but i only what make a Pointer to this - is this possible?
is there a way to make the #include "c:\extern\button.h" central ?
if i need a variable from main c icon,( Struct ... ) the function in makro do not know about too.
how can i tell the function ( makro ) about the variable in main as c icon?
i hope my question is clear.
Thank you!
Rudi
need central way for #include "c:\extern\files.h"
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: need central way for #include "c:\extern\files.h"
Build->Project Options->General Options
click Use supplementary code
click Supplementary Code button
and add your #include "c:\extern\button.h" to the Definitions section
you can also add global variables there too
click Use supplementary code
click Supplementary Code button
and add your #include "c:\extern\button.h" to the Definitions section
you can also add global variables there too
Re: need central way for #include "c:\extern\files.h"
LeighM wrote:Build->Project Options->General Options
click Use supplementary code
click Supplementary Code button
and add your #include "c:\extern\button.h" to the Definitions section
you can also add global variables there too
Hi Leigh
thank you i will try at evenning.
Leigh, a question, is this for my other question "struct" for all macros
http://www.matrixtsl.com/mmforums/viewt ... =7&t=15058
the same way?
Thank you!!
Best wishes
Rudi
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: need central way for #include "c:\extern\files.h"
Hi Rudi,
The top box is for includes and prototypes.
e.g.
The bottom box is for your functions.
e.g.
The top box is for includes and prototypes.
e.g.
Code: Select all
#include "c:\extern\button.h"
char addVars (char a, char b);
e.g.
Code: Select all
char addVars (char a, char b)
{
return a + b;
}
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: need central way for #include "c:\extern\files.h"
Best thank Benj and Leigh!!!
The weekend is saved
I must go one and make now ..
I give you an update again on Monday
I hope that I have the project transferred by then.
wish me good luck and squeezes my thumb - this will be my resume
i have learn many from you, your staff and VC's last month in FC and programming tips.
Best wishes!!!
Rudi
The weekend is saved
I must go one and make now ..
I give you an update again on Monday
I hope that I have the project transferred by then.
wish me good luck and squeezes my thumb - this will be my resume
i have learn many from you, your staff and VC's last month in FC and programming tips.
Best wishes!!!
Rudi