Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/152.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
MySQL连接器/C++示例代码不工作 你好,我刚刚开始在应用中使用C++ MySQL连接器 发布| Win3_C++_Mysql - Fatal编程技术网

MySQL连接器/C++示例代码不工作 你好,我刚刚开始在应用中使用C++ MySQL连接器 发布| Win3

MySQL连接器/C++示例代码不工作 你好,我刚刚开始在应用中使用C++ MySQL连接器 发布| Win3,c++,mysql,C++,Mysql,我的错误: 警告1警告C4627:“包括”:查看时跳过 对于预编译标头,请使用c:\Documents and Settings 警告2警告C4627:“包括”:查看时跳过 对于预编译标头,请使用c:\Documents and Settings 错误3致命错误C1083:无法打开包含文件: 'boost/variant.hpp':没有这样的文件或目录C:\Program 文件\ MySQL \ MySQL连接器C++ 1.1.0\include\cppconn\connection.h 29

我的错误:

警告1警告C4627:“包括”:查看时跳过 对于预编译标头,请使用c:\Documents and Settings

警告2警告C4627:“包括”:查看时跳过 对于预编译标头,请使用c:\Documents and Settings

错误3致命错误C1083:无法打开包含文件: 'boost/variant.hpp':没有这样的文件或目录C:\Program 文件\ MySQL \ MySQL连接器C++ 1.1.0\include\cppconn\connection.h 29 lacznik

警告1警告C4627:“包含”:查找预编译头时跳过使用c:\Documents and Settings

表示预编译头包括

#include "stdafx.h"

应该是包含的第一个标题。

您能正确缩进代码吗?我不想在精神上把我自愿的时间浪费在跟踪范围上。这段代码来自我不确定的库。这里是我的树,除了格式问题:你已经尝试了什么?你具体有什么问题?您是否阅读了常见问题解答和发布指南?事实上,这并不是一个问题。作为一个补充,默认情况下VisualStudio中的所有非托管C++项目都使用预编译的头文件。在这样的项目中,所有源文件都必须包含stdafx.h作为第一个include,或者获得与OP相同的错误。
#include "stdafx.h"