it's my first time I use Linux and C programming. I've wrote a file in C language to connect with MySQL and it's working fine now. Now I've to integrate this file into my company web-based system which is written with CGI ( C ). So I guess I should make my file as a header file and call this file from the CGI. How should I create a header file ? Or is there any better way ? I google 开发者_Go百科on the net but not so lucky with CGI. Can anybody help me?
I don't think that putting everything in a header file is the best solution.
- Create a header file and put the function prototypes and structure declarations in it
- Create a C file and put function definitions in it
Then you can either link with the object file obtained or you can create a dynamic library.
精彩评论