# Amalgamated juce without macros?

**URL:** <https://forum.juce.com/t/amalgamated-juce-without-macros/5267>\
**Category:** General JUCE discussion\
**Created:** [May 12, 2010, 1:27pm UTC](https://forum.juce.com/t/amalgamated-juce-without-macros/5267 "2010-05-12T13:27:30Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Flow](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@Flow](https://forum.juce.com/u/Flow)\
**Post date:** [May 12, 2010, 1:27pm UTC](https://forum.juce.com/t/amalgamated-juce-without-macros/5267/1 "2010-05-12T13:27:30Z")

</div>

Hey there,

Is there any way to use the amaglamated version of Juce without macros?  
There’s a T() macro clash with the Boost libraries so up till now I just included juce\_withoutmacros.h  
everywhere - as my project (and it’s build times…) are starting to grow however I was wondering if  
you can somehow manage to amalgamate juce without macros?

Thanks!

---

<div class="post-metadata">

**Author:** ![otristan](https://avatars.discourse-cdn.com/v4/letter/o/f0a364/32.png) [@otristan](https://forum.juce.com/u/otristan)\
**Post date:** [May 12, 2010, 1:59pm UTC](https://forum.juce.com/t/amalgamated-juce-without-macros/5267/2 "2010-05-12T13:59:58Z")

</div>

Something like that after juce include ?

`#ifdef T
#undef T
#endif
`

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [May 12, 2010, 2:18pm UTC](https://forum.juce.com/t/amalgamated-juce-without-macros/5267/3 "2010-05-12T14:18:43Z")

</div>

If you look inside the juce\_WithoutMacros, you’ll see that that all it does is define JUCE\_DONT\_DEFINE\_MACROS and include the normal headers. You could just do the same with the amalg file.

---

<div class="post-metadata">

**Author:** ![Flow](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@Flow](https://forum.juce.com/u/Flow)\
**Post date:** [May 12, 2010, 2:47pm UTC](https://forum.juce.com/t/amalgamated-juce-without-macros/5267/4 "2010-05-12T14:47:18Z")

</div>

The problem is that the amalgamated file is full of T() macros - as soon as the compiler encounters one it’s obviously an “identifier not found” error.

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [May 12, 2010, 5:01pm UTC](https://forum.juce.com/t/amalgamated-juce-without-macros/5267/5 "2010-05-12T17:01:44Z")

</div>

There certainly shouldn’t be any T macros in the headers. Are you using an up-to-date version? If so, let me know where they are and I’ll nuke them!

---

<div class="post-metadata">

**Author:** ![Flow](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@Flow](https://forum.juce.com/u/Flow)\
**Post date:** [May 12, 2010, 8:11pm UTC](https://forum.juce.com/t/amalgamated-juce-without-macros/5267/6 "2010-05-12T20:11:26Z")

</div>

Umm… well, the macros are in the source files - I get those errors within the juce\_amalgamated.cpp which I include just like the audio plugin demo does.

All this talk about headers seems to point at me doing something wrong though? :oops:

(Still version 1.50 btw - shouldn’t matter though I guess)

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [May 13, 2010, 7:40am UTC](https://forum.juce.com/t/amalgamated-juce-without-macros/5267/7 "2010-05-13T07:40:54Z")

</div>

Why on earth would you include any 3rd party headers before the amalgamated.cpp file???

---

<div class="post-metadata">

**Author:** ![Flow](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@Flow](https://forum.juce.com/u/Flow)\
**Post date:** [May 16, 2010, 4:45pm UTC](https://forum.juce.com/t/amalgamated-juce-without-macros/5267/8 "2010-05-16T16:45:01Z")

</div>

Alright, so this is what I do essentially:

juce\_LibrarySource.cpp:

> [@](#):
>
> #include “juce\_AppConfig.h”  
> #include “juce\_my\_amalgamated.cpp”

includes.h:

> [@](#):
>
> #include “juce\_AppConfig.h”  
> #define JUCE\_DONT\_DEFINE\_MACROS 1  
> #include “juce\_my\_amalgamated.h”

Every source file that needs to know about Juce then includes “includes.h” at the very beginning.  
Upon compiling I get a trillion of those:

Error 1 error C3861: ‘T’: identifier not found juce\_my\_amalgamated.cpp 8338

What am i doing wrong?

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [May 16, 2010, 6:31pm UTC](https://forum.juce.com/t/amalgamated-juce-without-macros/5267/9 "2010-05-16T18:31:12Z")

</div>

Like I said: don’t include any 3rd party files before including juce\_amalgamated.cpp!!

Maybe you’ve set your project up to auto-include this 3rd party file everywhere, so that’s also pulling it in when juce\_LibrarySource.cpp gets compiled?

---

<div class="post-metadata">

**Author:** ![Flow](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@Flow](https://forum.juce.com/u/Flow)\
**Post date:** [May 16, 2010, 8:00pm UTC](https://forum.juce.com/t/amalgamated-juce-without-macros/5267/10 "2010-05-16T20:00:03Z")

</div>

Oh dear, nevermind… don’t code when you’re tired! :roll:

Sorry Jules and thanks alot yet again
