質問編集履歴
2
ユーザー名、パスワードなどを、非表示にしました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -114,9 +114,9 @@
|
|
114
114
|
|
115
115
|
conn = mysql_init ( NULL );
|
116
116
|
|
117
|
-
mysql_real_connect ( conn, "
|
117
|
+
mysql_real_connect ( conn, "****", "****",
|
118
118
|
|
119
|
-
"
|
119
|
+
"****", "****", 3306, NULL, 0 );
|
120
120
|
|
121
121
|
version = mysql_get_server_version( conn );
|
122
122
|
|
1
エラー内容、コードなどを、変更しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,6 +1,80 @@
|
|
1
1
|
cを使って、外部のデーターべースに、接続しようとするt、下記のようなエラーが出ます。
|
2
2
|
|
3
|
+
Embarcadero C++ 7.20 for Win32 Copyright (c) 2012-2016 Embarcadero Technologies, Inc.
|
4
|
+
|
5
|
+
kakeibo_001.c:
|
6
|
+
|
7
|
+
In file included from kakeibo_001.c:4:
|
8
|
+
|
9
|
+
In file included from C:\Users\akira\Downloads\BCC101\BCC101\include\mysql_connection.h:30:
|
10
|
+
|
11
|
+
In file included from C:\Users\akira\Downloads\BCC101\BCC101\include\cppconn/connection.h:30:
|
12
|
+
|
13
|
+
In file included from C:\Users\akira\Downloads\BCC101\BCC101\bin\..\include\dinkumware64\map:10:
|
14
|
+
|
15
|
+
In file included from C:\Users\akira\Downloads\BCC101\BCC101\bin\..\include\dinkumware64\tuple:4:
|
16
|
+
|
17
|
+
In file included from C:\Users\akira\Downloads\BCC101\BCC101\bin\..\include\dinkumware64\type_traits:4:
|
18
|
+
|
19
|
+
In file included from C:\Users\akira\Downloads\BCC101\BCC101\bin\..\include\dinkumware64\xstddef:8:
|
20
|
+
|
21
|
+
C:\Users\akira\Downloads\BCC101\BCC101\bin\..\include\dinkumware64\initializer_list:8:1: error: unknown type name
|
22
|
+
|
23
|
+
'template'
|
24
|
+
|
25
|
+
template<class _Elem>
|
26
|
+
|
27
|
+
^
|
28
|
+
|
29
|
+
C:\Users\akira\Downloads\BCC101\BCC101\bin\..\include\dinkumware64\initializer_list:8:9: error: expected identifier or
|
30
|
+
|
31
|
+
'('
|
32
|
+
|
33
|
+
template<class _Elem>
|
34
|
+
|
35
|
+
^
|
36
|
+
|
37
|
+
C:\Users\akira\Downloads\BCC101\BCC101\bin\..\include\dinkumware64\initializer_list:58:1: error: unknown type name
|
38
|
+
|
39
|
+
'template'
|
40
|
+
|
41
|
+
template<class _Elem> inline
|
42
|
+
|
43
|
+
^
|
44
|
+
|
45
|
+
C:\Users\akira\Downloads\BCC101\BCC101\bin\..\include\dinkumware64\initializer_list:58:9: error: expected identifier or
|
46
|
+
|
47
|
+
'('
|
48
|
+
|
49
|
+
template<class _Elem> inline
|
50
|
+
|
51
|
+
^
|
52
|
+
|
53
|
+
C:\Users\akira\Downloads\BCC101\BCC101\bin\..\include\dinkumware64\initializer_list:66:1: error: unknown type name
|
54
|
+
|
55
|
+
'template'
|
56
|
+
|
57
|
+
template<class _Elem> inline
|
58
|
+
|
59
|
+
^
|
60
|
+
|
61
|
+
C:\Users\akira\Downloads\BCC101\BCC101\bin\..\include\dinkumware64\initializer_list:66:9: error: expected identifier or
|
62
|
+
|
63
|
+
'('
|
64
|
+
|
65
|
+
template<class _Elem> inline
|
66
|
+
|
67
|
+
^
|
68
|
+
|
69
|
+
----中略----
|
70
|
+
|
71
|
+
^
|
72
|
+
|
3
|
-
|
73
|
+
fatal error: too many errors emitted, stopping now [-ferror-limit=]
|
74
|
+
|
75
|
+
51 errors generated.
|
76
|
+
|
77
|
+
|
4
78
|
|
5
79
|
何か、追加で、インストールなどを、するのでしょうか?
|
6
80
|
|
@@ -9,3 +83,51 @@
|
|
9
83
|
データーベースは、mariadb(centos7)
|
10
84
|
|
11
85
|
です。
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
mysqlライブラリー、mysql_connection.hなどは、インストールしたつもりです。
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
コードは、
|
94
|
+
|
95
|
+
#include <stdio.h>
|
96
|
+
|
97
|
+
#include <windows.h>
|
98
|
+
|
99
|
+
#include <mysql/mysql.h>
|
100
|
+
|
101
|
+
#include <mysql_connection.h>
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
MYSQL *conn;
|
106
|
+
|
107
|
+
int version = 1;
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
int main ( int argc, char *argv[] )
|
112
|
+
|
113
|
+
{
|
114
|
+
|
115
|
+
conn = mysql_init ( NULL );
|
116
|
+
|
117
|
+
mysql_real_connect ( conn, "192.168.0.3", "akirasada1972",
|
118
|
+
|
119
|
+
"akira1972", "kakeibo", 3306, NULL, 0 );
|
120
|
+
|
121
|
+
version = mysql_get_server_version( conn );
|
122
|
+
|
123
|
+
printf("\nMySQL Version = %d\n",version);
|
124
|
+
|
125
|
+
mysql_close ( conn );
|
126
|
+
|
127
|
+
return 0;
|
128
|
+
|
129
|
+
}
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
です。
|