質問編集履歴

2

回答を反映

2016/11/18 05:51

投稿

dampa
dampa

スコア11

test CHANGED
File without changes
test CHANGED
@@ -136,7 +136,9 @@
136
136
 
137
137
  ###追記
138
138
 
139
-
139
+ 回答していただいた内容を活かして修正したコンパイルのログです。
140
+
141
+ ヘッダとライブラリを含めてコンパイルはできたと思うのですが、どうにもエラーがなくなりません。
140
142
 
141
143
 
142
144
 

1

指摘していただいた点の修正結果

2016/11/18 05:50

投稿

dampa
dampa

スコア11

test CHANGED
File without changes
test CHANGED
@@ -131,3 +131,185 @@
131
131
  ###補足情報(言語/FW/ツール等のバージョンなど)
132
132
 
133
133
  octave 4.0.3
134
+
135
+
136
+
137
+ ###追記
138
+
139
+
140
+
141
+
142
+
143
+ ```
144
+
145
+
146
+
147
+ gcc -g -Wall main.cpp -I/usr/local/include/octave-4.2.0/octave -I/usr/local/Cellar/octave/4.2.0/binoctave-'octave-config -v' -L/usr/local/lib/octave/4.2.0 -O0
148
+
149
+ In file included from main.cpp:2:
150
+
151
+ /usr/local/include/octave-4.2.0/octave/config.h:28:2: warning: "config.h has been deprecated; there is no need to include it
152
+
153
+ directly" [-W#warnings]
154
+
155
+ #warning "config.h has been deprecated; there is no need to include it directly"
156
+
157
+ ^
158
+
159
+ In file included from main.cpp:3:
160
+
161
+ In file included from /usr/local/include/octave-4.2.0/octave/Matrix.h:32:
162
+
163
+ In file included from /usr/local/include/octave-4.2.0/octave/mx-base.h:30:
164
+
165
+ In file included from /usr/local/include/octave-4.2.0/octave/MatrixType.h:29:
166
+
167
+ In file included from /usr/local/include/octave-4.2.0/octave/MSparse.h:31:
168
+
169
+ In file included from /usr/local/include/octave-4.2.0/octave/Sparse.h:37:
170
+
171
+ In file included from /usr/local/include/octave-4.2.0/octave/Array.h:37:
172
+
173
+ /usr/local/include/octave-4.2.0/octave/dim-vector.h:205:21: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
174
+
175
+ template <typename... Ints>
176
+
177
+ ^
178
+
179
+ /usr/local/include/octave-4.2.0/octave/dim-vector.h:209:10: error: no member named 'initializer_list' in namespace 'std'
180
+
181
+ std::initializer_list<octave_idx_type> all_lengths = {r, c, lengths...};
182
+
183
+ ~~~~~^
184
+
185
+ /usr/local/include/octave-4.2.0/octave/dim-vector.h:209:27: error: unexpected type name 'octave_idx_type': expected expression
186
+
187
+ std::initializer_list<octave_idx_type> all_lengths = {r, c, lengths...};
188
+
189
+ ^
190
+
191
+ /usr/local/include/octave-4.2.0/octave/dim-vector.h:209:44: error: use of undeclared identifier 'all_lengths'
192
+
193
+ std::initializer_list<octave_idx_type> all_lengths = {r, c, lengths...};
194
+
195
+ ^
196
+
197
+ /usr/local/include/octave-4.2.0/octave/dim-vector.h:209:58: error: expected expression
198
+
199
+ std::initializer_list<octave_idx_type> all_lengths = {r, c, lengths...};
200
+
201
+ ^
202
+
203
+ /usr/local/include/octave-4.2.0/octave/dim-vector.h:210:33: warning: range-based for loop is a C++11 extension
204
+
205
+ [-Wc++11-extensions]
206
+
207
+ for (const octave_idx_type l: all_lengths)
208
+
209
+ ^
210
+
211
+ /usr/local/include/octave-4.2.0/octave/dim-vector.h:210:35: error: use of undeclared identifier 'all_lengths'
212
+
213
+ for (const octave_idx_type l: all_lengths)
214
+
215
+ ^
216
+
217
+ /usr/local/include/octave-4.2.0/octave/dim-vector.h:212:12: error: use of undeclared identifier 'all_lengths'
218
+
219
+ rep -= all_lengths.size ();
220
+
221
+ ^
222
+
223
+ In file included from main.cpp:3:
224
+
225
+ In file included from /usr/local/include/octave-4.2.0/octave/Matrix.h:32:
226
+
227
+ In file included from /usr/local/include/octave-4.2.0/octave/mx-base.h:30:
228
+
229
+ In file included from /usr/local/include/octave-4.2.0/octave/MatrixType.h:29:
230
+
231
+ In file included from /usr/local/include/octave-4.2.0/octave/MSparse.h:31:
232
+
233
+ In file included from /usr/local/include/octave-4.2.0/octave/Sparse.h:37:
234
+
235
+ /usr/local/include/octave-4.2.0/octave/Array.h:282:30: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
236
+
237
+ template<template <typename...> class Container>
238
+
239
+ ^
240
+
241
+ /usr/local/include/octave-4.2.0/octave/Array.h:861:28: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
242
+
243
+ template<template <typename...> class Container>
244
+
245
+ ^
246
+
247
+ /usr/local/include/octave-4.2.0/octave/Array.h:876:19: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
248
+
249
+ for (const T& x : a)
250
+
251
+ ^
252
+
253
+ In file included from main.cpp:3:
254
+
255
+ In file included from /usr/local/include/octave-4.2.0/octave/Matrix.h:32:
256
+
257
+ In file included from /usr/local/include/octave-4.2.0/octave/mx-base.h:35:
258
+
259
+ In file included from /usr/local/include/octave-4.2.0/octave/chMatrix.h:32:
260
+
261
+ In file included from /usr/local/include/octave-4.2.0/octave/chNDArray.h:35:
262
+
263
+ /usr/local/include/octave-4.2.0/octave/str-vec.h:59:30: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
264
+
265
+ template<template <typename...> class String_Container, typename... Other>
266
+
267
+ ^
268
+
269
+ /usr/local/include/octave-4.2.0/octave/str-vec.h:59:67: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
270
+
271
+ template<template <typename...> class String_Container, typename... Other>
272
+
273
+ ^
274
+
275
+ /usr/local/include/octave-4.2.0/octave/str-vec.h:130:28: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
276
+
277
+ template<template <typename...> class String_Container, typename... Other>
278
+
279
+ ^
280
+
281
+ /usr/local/include/octave-4.2.0/octave/str-vec.h:130:65: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
282
+
283
+ template<template <typename...> class String_Container, typename... Other>
284
+
285
+ ^
286
+
287
+ /usr/local/include/octave-4.2.0/octave/str-vec.h:138:29: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
288
+
289
+ for (const std::string& s : lst)
290
+
291
+ ^
292
+
293
+ In file included from main.cpp:3:
294
+
295
+ In file included from /usr/local/include/octave-4.2.0/octave/Matrix.h:34:
296
+
297
+ In file included from /usr/local/include/octave-4.2.0/octave/mx-ext.h:54:
298
+
299
+ /usr/local/include/octave-4.2.0/octave/svd.h:43:12: warning: scoped enumerations are a C++11 extension [-Wc++11-extensions]
300
+
301
+ enum class Type
302
+
303
+ ^
304
+
305
+ /usr/local/include/octave-4.2.0/octave/svd.h:50:12: warning: scoped enumerations are a C++11 extension [-Wc++11-extensions]
306
+
307
+ enum class Driver
308
+
309
+ ^
310
+
311
+ 13 warnings and 6 errors generated.
312
+
313
+
314
+
315
+ ```