Problem integration of Juce in a project


#1

Dear all,

I am new in Juce, and I am trying to integrate it to an existing program (my program compiles and runs without juce). I just included “juce.h” into my “stdafx.h” and then I compile it (under Windows and Linux); I get errors in my program that don’t appear when I don’t include “juce.h”. This happens in debug and release mode; so I think somewhere in Juce some compilation rules are added that are not compatible with my project. Does anybody have an idea of what it can be? What can I change to remove it?

The strangest error I get is this one:
Here is the code of my function:

[code]template
template
inline void lwp_binary_iarchive::load_enum::invoke(lwp_binary_iarchive & Archive, T & Enum)
{
uint32_t Tmp;
Archive.load(Tmp);

Enum = T(Tmp);

}[/code]

And when I compile, the error is “Error C2065: ‘LTmp: undeclared identifier’”, and it happens whatever the name of this local variable is ! I don’t understand what can cause this kind of error…

Thanks for your help,
Elvina


#2

replace template typename T with Type, that’s all.
juce use T as a macro for unicode strings… hope this helps !


#3

To help in situations like this, you can also set JUCE_DONT_DEFINE_MACROS in your build to stop it defining that ‘T’ macro, because it does clash with some other libraries.


#4

Thanks, it works now…