基本上,我的工作区中有两个源文件,如下所示:
vectormath_aos.h
#ifndef _VECTORMATH_AOS_CPP_SCALAR_H
#define _VECTORMATH_AOS_CPP_SCALAR_H
#include <math.h>
#ifdef _VECTORMATH_DEBUG
#include <stdio.h>
#endif
namespace Vectormath {
namespace Aos {
//-----------------------------------------------------------------------------
// Forward Declarations
//
class Vector3;
class Vector4;
class Point3;
class Quat;
class Matrix3;
class Matrix4;
class Transform3;
...exampleopenglesViewController.mm
#import <QuartzCore/QuartzCore.h>
#import "exampleopenglesViewController.h"
#import "EAGLView.h"
#import "vectormath_aos.h"
Matrix4 mvpmatrix;
...然而,当我尝试在Xcode4.0中运行这个项目时,它总是给我一个错误:未知类型名称"Matrix4“。我真的很困惑,因为当我在Xcode3.2上工作的时候,它曾经为我工作过。有人知道这里出了什么问题吗?提前感谢!:)
发布于 2011-05-27 17:56:26
由于您使用的是名称空间,
Matrix4 mvpmatrix;应该是:
Vectormath::Aos::Matrix4 mvpmatrix;而不是。
https://stackoverflow.com/questions/6150265
复制相似问题