Я запускаю ARtoolkit на Mac OS X Lion (используя SDK 10.5 согласно инструкциям ARtoolkit) и хотел бы включить векторную библиотеку.
Однако, похоже, я не могу этого сделать и не понимаю, почему. Сначала я думал, что это проблема с инструментарием, использующим старый SDK, но при копании я вижу, что stl_vector.h включен в какой-то момент, и когда я включаю vector (или stl_vector в этом отношении), я получаю кучу сообщения об ошибках сброшены на меня.
Есть ли способ обойти это, чтобы я мог использовать векторы?
Вот мои пути включения:
#ifdef _WIN32
# include <windows.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#ifndef __APPLE__
# include <GL/glut.h>
#else
# include <GLUT/glut.h>
#endif
#include <AR/gsub.h>
#include <AR/param.h>
#include <AR/ar.h>
#include <AR/video.h>
#include <time.h>
#include "object.h"
#include <vector>
using namespace std;
Вот ошибки, которые я вижу ...
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/stl_vector.h
Expected type-specifier before 'allocator'
Expected '>' before 'allocator'
'input_iterator_tag' has not been declared
'forward_iterator_tag' has not been declared
'input_iterator_tag' has not been declared
'forward_iterator_tag' has not been declared
'input_iterator_tag' has not been declared
'forward_iterator_tag' has not been declared
There are no arguments to '__N' that depend on a template parameter, so a declaration of '__N' must be available
(if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
Expected nested-name-specifier before 'iterator_traits'
Expected initializer before '<' token
There are no arguments to '_IterCategory' that depend on a template parameter, so a declaration of '_IterCategory' must be available
Expected nested-name-specifier before 'iterator_traits'
Expected initializer before '<' token
There are no arguments to '_IterCategory' that depend on a template parameter, so a declaration of '_IterCategory' must be available
Expected nested-name-specifier before 'iterator_traits'
Expected initializer before '<' token
There are no arguments to '_IterCategory' that depend on a template parameter, so a declaration of '_IterCategory' must be available
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/allocator.h
Bits/c++allocator.h: No such file or directory
Expected template-name before '<' token
Expected `{' before '<' token
Expected unqualified-id before '<' token
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/stl_bvector.h
Expected template-name before '<' token
Expected `{' before '<' token
Expected unqualified-id before '<' token
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/stl_algobase.h
Bits/c++config.h: No such file or directory
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/iosfwd
Bits/c++locale.h: No such file or directory
Bits/c++io.h: No such file or directory