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 7736005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:38:32+00:00 2026-06-01T07:38:32+00:00

In an academic project I’m trying to setup a simple physics engine. I am

  • 0

In an academic project I’m trying to setup a simple physics engine.
I am using Eigen library for vector/matrixes calculation.
I’d like to stay as much independent as I can from library/design choices I’m making, to ease future changes, so I’m using typedefs for the Eigen types.

File PhysicsEngine.h

#pragma once

#include <Eigen/Core>
#include <Eigen/Geometry>
#include "RigidBody.h"

... other inclusions ...

namespace PhysicsEngine
{
    typedef float real;
    typedef Eigen::Vector3f vector3;
    typedef Eigen::Quaternionf quaternion;
    typedef Eigen::Matrix4f matrix4;
    typedef Eigen::Matrix3f matrix3;

    ...

1) Is that a good design choice or am I misunderstanding what my teacher told us?

Including the file above, in RigidBody.h, and trying to use those typedefs:

#pragma once

#include "PhysicsEngine.h"

namespace PhysicsEngine
{
    class RigidBody
    {
    public:
    vector3 position;               // <- error C4430
    real inverseMass;               // <- error C4430
    vector3 velocity;               // <- error C4430
    vector3 netForce;               // <- error C4430

    quaternion orientation;         // <- error C4430
    matrix3 inverseInertiaTensor;   // <- error C4430
    vector3 rotation;               // <- error C4430
    vector3 netTorque;              // <- error C4430

    matrix4 transformationMatrix;   // <- error C4430
    ...

I get:

error C4430: missing type specifier – int assumed. Note: C++ does not support default-int.

2) What am I doing wrong here?

Thanks in advance.

  • 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-01T07:38:33+00:00Added an answer on June 1, 2026 at 7:38 am

    Is that a good design choice or am I misunderstanding what my teacher told us?

    It might be a poor design choice since you hide the fact that you are using Eigen types, nevertheless you will need to know this fact in order to use your typedefs.

    I get a lot of errors C4430.

    Descriptions like that really annoy me. Your compiler won’t just die with “error C4430”, it gives you detailed error information that is crucial for finding the cause of the problem. You are making it hard for anyone to help you by not sharing this information. Can you please post the first complete message, along with the code line that is causing the error?

    The number of errors is irrelevant, since it is probable that most of the errors originate from the same problem.

    Since Microsofts warning C4430 reads “missing type specifier – int assumed”, I suspect that you are forgetting to include Eigen header files, so that the compiler does not know what an Eigen::Vector2f is.

    Try to add #include <Eigen/Core> to PhysicsEngine.h.


    From your updated code: You have circular dependencies. PhysicsEngine.h includes RigidBody.h and vice versa. This is not good.

    I suspect that while compiling RigidBody.cpp, the compiler will end up parsing the class definition in RigidBody.h before the typedefs in PhysicsEngine.h, so that your custom typedefs are not available at that point.

    You should probably remove the RigidBody.h include from PhysicsEngine.h, or move your typedefs to a separate header file.

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

Sidebar

Related Questions

I'm working on a academic project: writing a library for finding the shortest path
As part of an HTTP WebServer project for academic purposes, I'm trying write my
I'm working on an academic project which simulates a rather large queuing procedure in
I'm trying to find any research/academic/journal papers/articles that analyze recent versions of Qt and
I was doing my academic project and while building and testing i have put
I'm doing a desktop academic project one of the requirment of this project is
I am writing an academic project about extremely long functions in the Linux kernel
Coming from an academic background in mutli-agent systems (developed in Java using JADE )
I'm trying to write a new emacs mode for a new template c-like language,
I work at a university, on a project for a web driven academic management

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.