Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8888771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:06:34+00:00 2026-06-14T22:06:34+00:00

I am creating a converter for quaternions to euler angles, I have written this

  • 0

I am creating a converter for quaternions to euler angles, I have written this code:

//(...)
/*
* 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;
}
//(...)

I included the EulerAngles.c from http://tog.acm.org/resources/GraphicsGems/gemsiv/euler_angle/ into my project, I also downloaded all the other files into my project.

When I try to compile my project I get these error messages from Visual Studio 2012:

Error   1   error LNK2001: unresolved external symbol "struct Quat __cdecl Eul_FromQuat(struct Quat,int)" (?Eul_FromQuat@@YA?AUQuat@@U1@H@Z)    .\calculatorSAMP\calculatorSAMP.obj calculatorSAMP
Error   2   error LNK1120: 1 unresolved externals   .\calculatorSAMP\Release\calculatorSAMP.dll calculatorSAMP

the QuadTypes.h which is included in EulerAngles.h has this code:

/**** 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

What am I missing here?

I tried to edit it to:

/**** 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

But it caused more errors.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T22:06:35+00:00Added an answer on June 14, 2026 at 10:06 pm

    If it is a .c file, it is compiled as C by default.

    You either have to change the “compile as” option for that file, or add extern "C" to the declaration in the .h file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a source code that is needed to be converted by creating classes,
Is there a way to prevent this without creating a new converter? <p:inputText value=#{myMB.myDouble}
I have this situation: I've an enum and I'm creating a datagrid composed of
I am creating a type converter for use in a in-house library that should
I'm creating an application which communicates with the device via FT2232H USB/RS232 converter. For
I followed this screencast to make a erb:to:haml rake task: http://teachmetocode.com/screencasts/creating-a-rake-task-to-convert-erb-to-haml/ I backed everything
I've found a bunch of posts on this problem and have actually managed to
Hi I am trying to do some calculations for a unit converter im creating
When creating WPF user controls I often find myself creating small converter classes when
I am creating a currency converter app. I know that the value of currencies

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.