开发者

vc++ - I want to compile a program which uses mysql, please direct me

Hai, I done a server program in vc++(using visualstudio 2008). At that time it worked perfectly. But after that I uninstalled the visualstudio 2010. Now I can't open that pro file using vs2008(it is saying that it can't open the file). So I copied the header,cpp files and tried to compile , but it's not compiling. I added the libmysql.lib in properties->dependencies. And added the include path also. But still I am getting the following errors.

So he I am produci开发者_StackOverflow中文版ng a stub.

#include <winsock.h>
#include <mysql.h>

int main()
{
MySql a;
return 0;
}

the errors I am getting are

error C2065: 'MySql' : undeclared identifier
error C2146: syntax error : missing ';' before identifier 'a'
error C2065: 'a' : undeclared identifier

I don't know what I am doing wrong. Somebody please help me.


You have the case wrong for the declaration:

MySql a;

should be

MYSQL a;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜