After updating my application to the latest tip I get a load of errors:
error: there are no arguments to ‘T’ that depend on a template parameter, so a declaration of ‘T’ must be available
in the file juce_amalgamated.h here:
const String toString() const
{
String s;
s.preallocateStorage (16);
s << x << T(' ') << y << T(' ') << w << T(' ') << h; <<<<<<<< this line
return s;
}
On Windows it compiles fine. Is there something changed in this area?
jules
March 19, 2010, 10:02am
2
No, nothing has changed, and I can compile that with no probs. Normally if T causes problems it’s because you’ve included juce.h before an OS header file that uses T as a template parameter.
The problem seems to be related with the JUCE_DONT_DEFINE_MACROS define I have to use.
To simplify things, it can be reproduced in the Hello World demo, by adding:
#include “…/…/…/src/juce_WithoutMacros.h”
#include “…/…/…/juce.h”
#include “…/…/…/src/juce_DefineMacros.h”
instead of
#include “…/…/…/juce_amalgamated.h”
Now you’ll get the error whereas the older version of Juce compiled fine.
jules
March 20, 2010, 12:17pm
4
You don’t need to include juce.h directly - it’s already included by juce_WithoutMacros.h. Probably adding both is confusing things…
Sorry, my mistake.
Anyway, this:
#include "../../../src/juce_WithoutMacros.h"
#include "../../../src/juce_DefineMacros.h"
produces the “error: there are no arguments to ‘T’” errors in juce_Rectangle.h, while:
compiles fine. The older version didn’t generate this errors.
jules
March 20, 2010, 7:54pm
6
Ok, I’ll take a look and sort that out.