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

  • Home
  • SEARCH
  • 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 6161335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:27:40+00:00 2026-05-23T21:27:40+00:00

I am compiling a large project containing >500 classes. After compiling VS 2010 there

  • 0

I am compiling a large project containing >500 classes. After compiling VS 2010 there have been no problems. When using g++ (Code:: Blocks / Netbeans) under Windows the code will not compile with the following error:

library/source/algorithms/file/../../algorithms/graph/../algebra/../spheredistance
/file.hpp:31:51: fatal error: ../../exception/ErrorOverflow.h: No such file or directory. 
Compilation terminated.

However, this file exists in the specified path. Linux version works correctly.
Character / or \ in the path does not matter (tested).

If I change order of included files, the above mentioned error disappears and a similar error appears elsewhere in the code…

I think that somewhere in the code there is a cyclic dependency or wrong order of included files.

File structure:

1) .cpp file

#include "file.h"

2) .h file

#ifndef file_H
#define file_H

template <typename T>
class Class 
{
};

#include "file.hpp"
#endif

3) .hpp file

#ifndef file_HPP
#define file_HPP

#include "../../somefile.h"

template <typename T>
class Class 
{

};

#endif

Most of header files *.h are included in *.hpp files, but in some *.h files there is a need for including another *.h file. A short and simplified example illustrating rounding on/off of the result:

Orientation.h
#ifndef Orientation_H
#define Orientation_H


typedef enum
{
    RoundOn, RoundOff
} TRound;


class Orientation
{
    public:
            template <typename T>
            static short getOrientation( const T dx1, const T dy1, const T dx2, const T dy2, const TRound round = RoundOff );
};

Some class Position: method gives round on / round off results

#include "Orientation.hpp"

Position.hpp
#ifndef Position_H
#define Position_H

#include "../orientation/Orientation.h"  //must be included for Rounding


class Position
{
    public:
            template <typename Point1, typename Point2>
            static unsigned short getPosition ( const Point1 * p, const Point2 * p1, const Point2 * p2, const TRoundType round );
};

#include "Position.hpp"

#endif

Please advise:

  • which header/include policy is suitable for such a large project.
  • how to find headers with the wrong order of including (if it is possible)
  • how to reorganize this project to avoid above mentioned problems.

UPDATED RESULTS:

Thank you all for your helpful advice.

I am sorry, I was completely wrong. A bug was actually in relative path containing characters .. (double dot)

After rewriting all include directives is everything OK.

  • 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-05-23T21:27:41+00:00Added an answer on May 23, 2026 at 9:27 pm

    However, this file exists in the specified path

    No, it does not.

    Although you’re right in that cyclic inclusion can lead to some misleading error messages, this is not one of them.

    One thing to bear in mind is that the resolution of inclusion paths is implementation-defined (2003:12.8/1), which may be why you’re seeing inconsistency across toolchains. The use of relative paths is particularly curious. Simplify your source tree and inclusion paths, and this problem will go away.

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

Sidebar

Related Questions

I have a very large program which I have been compiling under visual studio
After compiling a simple C++ project using Visual Studio 2008 on vista, everything runs
I have a large project which I am compiling with GWT. During this process
I have a large Java Web Application project using Maven and I need to
Is there any software available in linux which compiles a source code containing large
I have been working on a project that dynamically creates a javascript file using
So I have a Visual Studio 2008 project which has a large amount of
I have a requirement for compiling large number of projects (some of them having
I have a pure Action Script 3 project which I am compiling with the
I have a large solution containing many C# projects. When I open the solution

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.