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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:05:50+00:00 2026-06-11T07:05:50+00:00

I am working on a 3d game engine which requires some maths, but i

  • 0

I am working on a 3d game engine which requires some maths, but i want to modulate my code better by putting the math into a library. Right now im using a header file called “DataTypes.hpp” which has all structures and datatypes my engine needs. This also includes my math files, “VMMath.hpp” (this serves as a wrapper) and within here i include four other header files for my vector, matrix and quaternion classes.

My approach being i want DataTypes to be become a precompiled header, and the VMMath code to be a library (static or dll, ill be honest im not sure which). As then i dont have to put the DataType header in all the VMMath sources, and reduce the relevant source files for the project.

From what i have seen a library must be one header and source, which uses extern or static keywords so the header can use the methods in the source. The example on MSDN shows a class in a namespace with no constructors/destructors with static methods. But i find it abit short to really show you what its capable of.

So is it possible to create a library from this sort of file structure:

<-Project Dir->

  • (other sources/folders)

  • VMMath

    — VMMath.hpp

    • Math

      — CVector2.hpp

      — CVector2.cpp

      — CPoint2.hpp

      — CVector3.hpp

      — CVector3.cpp

      — CPoint3.hpp

      — CVector4.hpp

      — CVector4.cpp

      — CMatrix3.hpp

      — CMatrix3.cpp

      — CMatrix4.hpp

      — CMatrix4.cpp

      — CQuaternion.hpp

      — CQuaternion.cpp

I hope that makes sense. So one way i can see this working is having VMMath.hpp have ALL classes inside, and VMMath.cpp containing ALL the classes source, but this isnt very maintainable. Or would i have to make each class as a seperate dll?

Here is an article from codeproject i have read but it doesn’t show a dll with multiple files : http://www.codeproject.com/Articles/6351/Regular-DLL-Tutor-For-Beginners

I hope ive made my self clear, appologies if i have generated too much reading.

  • 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-11T07:05:52+00:00Added an answer on June 11, 2026 at 7:05 am

    There is no restriction on the number of header or source files for any kind of library.

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

Sidebar

Related Questions

i am working on voxel based game engine, in which i need to have
I am now working on a some sort of a game engine and I
Its a little strange. Ok so I am working with OGRE game engine which
I'm working on a university assignment to improve a game engine. The code we've
I am working on engine (http://b2dengine.com/) to implement my game idea, which is already
I've been working on a card game engine in C# .NET for some time
I am working on a game engine which is loosely descended from Quake 2,
Alright so I've been working on a game engine, and I'm running into a
I'm trying to make a fully-automated game engine which needs to be working based
this is part of my code to my game engine that I am working

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.