MICRO-C Software "split source code"

Thread Starter

Moelsayed

Joined Dec 12, 2017
16
Dear All,

Please I need to split my code into several source codes files in ( MICRO -C) program .
how can I do something like that please.

by the way I added one external source file into my project but I couldn't use the function which is created in this external source file ( to use it in main source file ).

So please i need your help.

Thanks.
Moelsayed
 

spinnaker

Joined Oct 29, 2009
7,837
Dear All,

Please I need to split my code into several source codes files in ( MICRO -C) program .
how can I do something like that please.

by the way I added one external source file into my project but I couldn't use the function which is created in this external source file ( to use it in main source file ).

So please i need your help.

Thanks.
Moelsayed

Just do it. Tshat is how.Break things down into logic functions. I have files for lcd, switches, lights, sensors etc. My function name starts with the file name.

For example lcd_Init() initializes the lcd panel. lcd_Write(char *str) writes to the lcd panel etc.
 

Thread Starter

Moelsayed

Joined Dec 12, 2017
16
Just do it. Tshat is how.Break things down into logic functions. I have files for lcd, switches, lights, sensors etc. My function name starts with the file name.

For example lcd_Init() initializes the lcd panel. lcd_Write(char *str) writes to the lcd panel etc.
please could you give me a detailed steps to show me how can i add ( source file & header file )
if you have a small project created by MICRO-C PRO. it will be helpful for me

Thanks in advance.
Moelsayed
 

spinnaker

Joined Oct 29, 2009
7,837
You just create the files and place an include statement at the top of the file for the header files needed. This is an EXTREMELY basic and simple procedure. If you ned thatr level of help then you need a whole lot more training then can be provided here. I suggest you seek out an online training for C.
 
Top