
Originally Posted by
skepticalgeek
Any flags I can pass to Qmake or MinGw so that it will be smart enough to figure this out on it's own, without me having to guess at which order it wants the include statements in?
No, it's not possible. Consider the following two include files:
// A.h
#ifndef SOME_VAR
#define SOME_VAR 1
#endif
// A.h
#ifndef SOME_VAR
#define SOME_VAR 1
#endif
To copy to clipboard, switch view to plain text mode
// B.h
#ifndef SOME_VAR
#define SOME_VAR 2
#endif
// B.h
#ifndef SOME_VAR
#define SOME_VAR 2
#endif
To copy to clipboard, switch view to plain text mode
and then:
// main.cpp
#include <A.h>
#include <B.h>
// main.cpp
#include <A.h>
#include <B.h>
To copy to clipboard, switch view to plain text mode
It's not possible to determine if this is a correct include order or not without knowing the effect you want to achieve. The compiler can't do it for you.
Bookmarks