用vc编写连接mysql数据库需要哪些头文件,我遍了一个访问的程序
老是提示:
rror C2065: 'String' : undeclared identifier
可是我只要是与字符串有关的头文件都包含进去了,
还是报同样的错,这怎么解决,我
创建的是一个win32空项目

解决方案 »

  1.   

    String
    The String structure depicts the organization of data in a file-version resource. It contains a string that describes a specific aspect of a file, for example, a file's version, its copyright notices, or its trades. This structure is not a true C-language structure because it contains variable-length members. This structure was created solely to depict the organization of data in a version resource and does not appear in any of the header files shipped with the Microsoft® Platform Software Development Kit (SDK). 你最好不要用String改用其他的名字!
      

  2.   

    mysql.h就可以了,还要libmySQL.lib
      

  3.   

    有谁真正做过MySql,我想这个问题应该遇到过吧,怎么解决?
    MySqlCGI.obj : error LNK2001: unresolved external symbol _mysql_fetch_row@4
    MySqlCGI.obj : error LNK2001: unresolved external symbol _mysql_num_rows@4
    MySqlCGI.obj : error LNK2001: unresolved external symbol _mysql_store_result@4
    MySqlCGI.obj : error LNK2001: unresolved external symbol _mysql_query@8
    MySqlCGI.obj : error LNK2001: unresolved external symbol _mysql_real_connect@32
    MySqlCGI.obj : error LNK2001: unresolved external symbol _mysql_init@4
    LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
    Debug/MySqlCGI.exe : fatal error LNK1120: 8 unresolved externals
      

  4.   

    我已经调试到只有这么两条错误了,谁指点一下
    LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
    Debug/MySqlCGI.exe : fatal error LNK1120: 1 unresolved externals
    Error executing link.exe.
      

  5.   

    请各位不要回帖了,我已经自己解决了问题,主要是设置project属性及链接文件设置的问题
    谢谢楼上的两位朋友热心肠