# How to add Linker flag in Projucer

**URL:** <https://forum.juce.com/t/how-to-add-linker-flag-in-projucer/19835>\
**Category:** General JUCE discussion\
**Created:** [November 8, 2016, 2:51am UTC](https://forum.juce.com/t/how-to-add-linker-flag-in-projucer/19835 "2016-11-08T02:51:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![grnbriar](https://avatars.discourse-cdn.com/v4/letter/g/dfb087/32.png) [@grnbriar](https://forum.juce.com/u/grnbriar)\
**Post date:** [November 8, 2016, 2:51am UTC](https://forum.juce.com/t/how-to-add-linker-flag-in-projucer/19835/1 "2016-11-08T02:51:47Z")

</div>

I need to add a Linker flag, just for the release version, to be compatible with a support lib.  
Is it possible to add a link flag in Projucer, rather than hand set it every time I need a release build?  
I’m keeping both Windows and Mac files and project settings in Projucer, very successfully so far.

---

<div class="post-metadata">

**Author:** ![anthony-nicholls](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/anthony-nicholls/32/1246_2.png) [@anthony-nicholls](https://forum.juce.com/u/anthony-nicholls)\
**Post date:** [November 8, 2016, 11:20am UTC](https://forum.juce.com/t/how-to-add-linker-flag-in-projucer/19835/2 "2016-11-08T11:20:36Z")

</div>

Windows:

- click the relevant configuration
- add flag to “Extra linker flags”

Mac:

- click the relevant configuration
- in “Custom Xcode flags” add something like “MY\_SPECIAL\_LINKER\_FLAG=-someFlag”
- click the Xcode exporter
- add “$(MY\_SPECIAL\_LINKER\_FLAG)” to “Extra linker flags”

For all other configurations you can either set the MY\_SPECIAL\_LINKER\_FLAG to something different or ignore it all together and it will evaluate to nothing

---

<div class="post-metadata">

**Author:** ![Rosell](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@Rosell](https://forum.juce.com/u/Rosell)\
**Post date:** [June 7, 2021, 11:35am UTC](https://forum.juce.com/t/how-to-add-linker-flag-in-projucer/19835/3 "2021-06-07T11:35:07Z")

</div>

This worked for me, however overlooked the fact that you need to comma separate the flags if you need multiple values.

Just adding that here as a reminder if anyone else hits the same problem!
