|
From: Jan M. <jan...@vo...> - 2008-03-30 01:49:58
|
Hello,
maybe it is clear but I am a little bit confused.
This is the source code:
#include<stdio.h>
#include<string.h>
const char *module_name = "conf_proces.c";
const char *conf_file_name = "..\\conf\\conf.xml";
int conf_file_read(const char *in_conf_file_name)
{
const char *function_name = "conf_file_read";
const char *err_msg;
int i;
FILE *p_fo;
/*open and read the conf file*/
if ((p_fo = fopen (conf_file_name, "r")) == NULL)
{
/* ERROR PROCESSING */
err_msg = strcat ("Cannot open the configuration file: ", strcat
(in_conf_file_name, "\n"));
/* write_err (module_name, function_name, err_msg); */
}
if ( (i = (fclose (p_fo) != 0)))
{
/* ERROR PROCESSING */
err_msg = strcat ("Cannot close the configuration file: ", strcat
(in_conf_file_name, "\n"));
/* write_err (module_name, function_name, err_msg); */
}
return 0;
}
And this is the gcc outpput:
C:\Documents and Settings\Jan Mura\_myhome\dev\dialogues\src>gcc
conf_process.c
conf_process.c: In function `conf_file_read':
conf_process.c:27: warning: passing arg 1 of `strcat' discards qualifiers
from p
ointer target type
conf_process.c:36: warning: passing arg 1 of `strcat' discards qualifiers
from p
ointer target type
C:/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/../../../libmingw32.a(main.o)(.text+0x10
6):main.c: undefined reference to `WinMain@16'
collect2: ld returned 1 exit status
It is ok with these warnings, I understand it.
But I don't understand what means the error message about the WinMain
function. There is no main neither WinMain. I don't use windows.h, Win
components or anything like that.
Jan Mura
jan...@vo...
|