xcode プロジェクトで cpp ファイルを使用しています。cppファイルでは、次のことを行います
ReadYML.h
typedef struct {
float Position[3];
float Color[4];
float TexCoord[2];
} Vertex_OR;
extern Vertex_OR Vertices_OR [100];
extern GLubyte Indices_OR [30];
ReadYML.cpp で
これに値を割り当てました。
ビューで.m
「sample.h」を宣言しました
Vertices_OR と Indices_OR にアクセスしようとしましたが、以下のエラーが発生していますか?
Undefined symbols for architecture i386:
"_Indices_OR", referenced from:
loadyml() in ReadYMLfile.o
"_Vertices_OR", referenced from:
loadyml() in ReadYMLfile.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ここで何が問題なのですか?view.m でアクセスするには、"Sample.h" で宣言されたグローバル変数を使用する必要がありますか? 出来ますか?