How to generate .H file from the .lib file ? i have created .lib file and i have the .c file for the .lib file itself.
You can't generate a header file from a library file.
The person who did write the C file should also have written a header file listing all functionality the C file exports. It's part of standard C coding to create corresponding header files when code is split between multiple C files - so if you have the C file then you, yourself, should be able to create a header file if you do know how to code in C.
I have generated the .H file and it works perfectly, but i was unaware that .H file can be created manually only, i thought it can be generated by some tools while creating .lib file.
is there any literature/article regarding how to use the syntax of the .H file like #ifndef __ ,#endif and all others.
Thank You sir for your valuable response.
If header files could be generated automatically, then there would be no need for header files in the first place, since the compiler would then be able to compile code without any header files by instead just deducing the corresponding information.
Yes, it's common to add guards against multiple-inclusion. For documentation about best practices - how about you google for "c coding best practices" and pick it up from there.
There is nothing special or magic about so-called "header" files - they just follow the standard syntax of the 'C' programming language.
So the literature you're looking for is just standard 'C' literature - textbooks, etc.
Here's some to get you started:
blog.antronics.co.uk/.../