main.cpp
#include "includes.h"
#include "LOGMSGs.h"
int main()
{
LOGMSG("TEST");
getch();
return 0;
}
MYSQLcon.cpp
#include "LOGMSGs.h"
int Mysql()
{
MYSQL *con, mysql;
mysql_init(&mysql);
const char * host="localhost";
const char * user="test";
const char * pass="test";
const char * db="NewServer";
con = mysql_real_connect(&mysql,host,user,pass,db,NULL,NULL,NULL);
if (con == NULL) {
Error(mysql_error(&mysql));
return 1;
}
LOGMSG("MySQL Connected successfully");
}
Error: error LNK2005: "void __cdecl LOGMSG(char const *,...)" (?LOGMSG@@YAXPBDZZ) already defined in main.obj
what's wrong