I have been at this for weeks and I am able to get most of the errors cleared on my own. I am stuck on these errors and I am unable to find out what is really wrong and going on. I am still pretty new at this. The code I have is listed below. Where the error is located at is at mysql_field. It is throwing a C2447 '{': missing function header(old-style format list?). I have three of these errors.
#include "field_types.h"
#include "my_list.h"
#include "mysql_com.h"
/* Include declarations of plug-in API */
#include "mysql/client_plugin.h" // IWYU pragma: keep
/*
The client should be able to know which version it is compiled against,
even if mysql.h doesn't use this information directly.
*/
#include "mysql_version.h" // IWYU pragma: keep
// MYSQL_TIME is part of our public API.
#include "mysql_time.h" // IWYU pragma: keep
// The error messages are part of our public API.
#include "errmsg.h" // IWYU pragma: keep
#ifdef __cplusplus
extern "C"
#endif
#include <mysql.h>
namespace MySQL {
extern signed int mysql_port;
};
extern char* mysql_unix_port;
#define CLIENT_NET_RETRY_COUNT 1 /* Retry count */
#define CLIENT_NET_READ_TIMEOUT 365 * 24 * 3600 /* Timeout on read */
#define CLIENT_NET_WRITE_TIMEOUT 365 * 24 * 3600 /* Timeout on write */
#define IS_PRI_KEY(n) ((n)&PRI_KEY_FLAG)
#define IS_NOT_NULL(n) ((n)&NOT_NULL_FLAG)
#define IS_BLOB(n) ((n)&BLOB_FLAG)
/**
Returns true if the value is a number which does not need quotes for
the sql_lex.cc parser to parse correctly.
*/
#define IS_NUM(t) \
(((t) <= MYSQL_TYPE_INT24 && (t) != MYSQL_TYPE_TIMESTAMP) || \
(t) == MYSQL_TYPE_YEAR || (t) == MYSQL_TYPE_NEWDECIMAL)
#define IS_LONGDATA(t) ((t) >= MYSQL_TYPE_TINY_BLOB && (t) <= MYSQL_TYPE_STRING)
MYSQL_FIELD;
{
char* name; /* Name of column */
char* org_name; /* Original column name, if an alias */
char* table; /* Table of column if column was a field */
char* org_table; /* Org table name, if table was an alias */
char* db; /* Database for table */
char* catalog; /* Catalog for table */
char* def; /* Default value (set by mysql_list_fields) */
unsigned long length; /* Width of column (create length) */
unsigned long max_length; /* Max width for selected set */
unsigned int name_length;
unsigned int org_name_length;
unsigned int table_length;
unsigned int org_table_length;
unsigned int db_length;
unsigned int catalog_length;
unsigned int def_length;
unsigned int flags; /* Div flags */
unsigned int decimals; /* Number of decimals in field */
unsigned int charsetnr; /* Character set */
enum enum_field_types type; /* Type of field. See mysql_com.h for types */
void* extension;
};
typedef char **MYSQL_ROW; /* return data as array of strings */
typedef unsigned int MYSQL_FIELD_OFFSET; /* offset to current field */
#define MYSQL_COUNT_ERROR (~(uint64_t)0)
/* backward compatibility define - to be removed eventually */
#define ER_WARN_DATA_TRUNCATED WARN_DATA_TRUNCATED