내가 오일러 각을 쿼터니온 변환기를 작성하고는,이 코드를 작성했습니다 :typedef가있는 동안 해결되지 않은 외부 기호 오류가 발생하는 이유는 무엇입니까?
//(...)
/*
* Converter Includes
*/
#include "EulerAngles.h"
//(...)
static cell AMX_NATIVE_CALL n_QuatToEuler(AMX* amx, cell* params)
{
Quat q;
q.x = amx_ctof(params[1]);
q.y = amx_ctof(params[2]);
q.z = amx_ctof(params[3]);
q.w = amx_ctof(params[4]);
EulerAngles EU = Eul_FromQuat(q,params[5]);
//(...)
return 1;
}
//(...)
나는, 내 프로젝트에 http://tog.acm.org/resources/GraphicsGems/gemsiv/euler_angle/에서 EulerAngles.c을 포함 나는 또한 내 프로젝트에 다른 모든 파일을 다운로드.
나는 비주얼 스튜디오 2012에서 이러한 오류 메시지 I 얻을 내 프로젝트를 컴파일 할 때 :
/**** QuatTypes.h - Basic type declarations ****/
#ifndef _H_QuatTypes
#define _H_QuatTypes
/*** Definitions ***/
typedef struct {float x, y, z, w;} Quat; /* Quaternion */
enum QuatPart {X, Y, Z, W};
typedef float HMatrix[4][4]; /* Right-handed, for column vectors */
typedef Quat EulerAngles; /* (x,y,z)=ang 1,2,3, w=order code */
#endif
: EulerAngles.h에 포함되어
Error 1 error LNK2001: unresolved external symbol "struct Quat __cdecl Eul_FromQuat(struct Quat,int)" ([email protected]@[email protected]@[email protected]@Z) .\calculatorSAMP\calculatorSAMP.obj calculatorSAMP
Error 2 error LNK1120: 1 unresolved externals .\calculatorSAMP\Release\calculatorSAMP.dll calculatorSAMP
QuadTypes.h이 코드가를 내가 여기서 무엇을 놓치고 있니?
나는 그것을 수정하려고 :/**** QuatTypes.h - Basic type declarations ****/
#ifndef _H_QuatTypes
#define _H_QuatTypes
/*** Definitions ***/
struct Quat {float x, y, z, w;}; /* Quaternion */
enum QuatPart {X, Y, Z, W};
typedef float HMatrix[4][4]; /* Right-handed, for column vectors */
#define EulerAngles Quat ; /* (x,y,z)=ang 1,2,3, w=order code */
#endif
그러나 이상의 오류가 발생했습니다.
'EulerAngles.c'에는 링크가없는 것 같습니다. 너는 어떻게 꾸미고 있니? – Xymostech
VS2012의 BUILD 메뉴에서 "Build Project"를 선택하면 프로젝트의 파일에 EurlerAngles.c가 qadded되었습니다. –
EulerAngles.c의 소스 코드를 제 주 .cpp 파일에 포함 시켰습니다. 컴파일이되었는데, 왜 내 파일이 링크되어 있지 않습니까? –