When I tried to use sql.h sqlext.h etc reside in mingw\include,I found it is not a simple task in C++ environment.So many thing the compiler can not found:va_list,SQLHANDLE,SQLHDESC...
I was just creating a new project by new->console app->c++,using mingw.Below is the code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <windef.h>
#include <winbase.h>
#include <windows.h>
#include <windowsx.h>
#include <sqltypes.h>
#include <sqlucode.h>
#include <sql.h>
#include <sqlext.h>
#include <iostream>
using namespace std;
int main()
{
cout << "Hello world!" << endl;
return 0;
}
But when I have another try in C environment,everything is fine:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <windows.h>
#include <sql.h>
#include <sqlext.h>
int main()
{
printf("Hello world!\n");
return 0;
}
So what's wrong with what I have done?Help would be appreciated!
Regards,
Sam