chipKIT32/chipKIT32-MAX — Issue #204: Order matters with WProgram.h
Author: ricklon
Created: 2012-02-05 01:27:56+00:00
State: open

WProgram.h is included automatically. But it's not declared as first line of the software. So in some scenarios it's defining values that are depended on by other header files. For instance IOShieldTemperature libraries have an issue. Here's how it appears to be;
The problem is that for some reason there is an ordering problem.

Bad:
#include
#include "WProgram.h"

Good:
#include "WProgram.h"
#include

The include from your code:
#include "WProgram.h"

#include
#include "WProgram.h"

So if the dependency was removed. That would be the solution.
Otherwise, a solution would be to always have "WProgram.h" be included