# Projucer 6.0.7 and later prepends $(SRCROOT) to absolute include paths

**URL:** <https://forum.juce.com/t/projucer-6-0-7-and-later-prepends-srcroot-to-absolute-include-paths/45481>\
**Category:** The Projucer\
**Created:** [April 12, 2021, 12:52pm UTC](https://forum.juce.com/t/projucer-6-0-7-and-later-prepends-srcroot-to-absolute-include-paths/45481 "2021-04-12T12:52:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/sebk/32/6425_2.png) [@sebk](https://forum.juce.com/u/sebk)\
**Post date:** [April 12, 2021, 12:52pm UTC](https://forum.juce.com/t/projucer-6-0-7-and-later-prepends-srcroot-to-absolute-include-paths/45481/1 "2021-04-12T12:52:21Z")

</div>

Hi,

when using Projucer 6.0.7/6.0.8 on **Windows** to export projects files, a `$(SRCROOT)` is prepended to **absolute** include paths in XCode projetcs, e.g. when specifying a VST Legacy SDK folder or adding header search paths. Running Projucer on **OSX** and exporting the same projects the paths are correct.

Is this a bug in Projucer? Or is it not supported to have absolute include paths?

Cheers,  
Sebastian

---

<div class="post-metadata">

**Author:** ![ed95](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/ed95/32/7635_2.png) [@ed95](https://forum.juce.com/u/ed95)\
**Post date:** [April 12, 2021, 4:43pm UTC](https://forum.juce.com/t/projucer-6-0-7-and-later-prepends-srcroot-to-absolute-include-paths/45481/2 "2021-04-12T16:43:36Z")

</div>

Thanks for reporting. The issue was due to how the Projucer was determining what constitutes an absolute file path on Windows vs Unix and should now be fixed on `develop` with commit [060f96a](https://github.com/juce-framework/JUCE/commit/060f96ae7cf34a9358978981258e6e6ea74a5002).

---

<div class="post-metadata">

**Author:** ![sebk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/sebk/32/6425_2.png) [@sebk](https://forum.juce.com/u/sebk)\
**Post date:** [April 13, 2021, 5:58am UTC](https://forum.juce.com/t/projucer-6-0-7-and-later-prepends-srcroot-to-absolute-include-paths/45481/3 "2021-04-13T05:58:03Z")

</div>

Thanks for the quick fix! 🙂

---

<div class="post-metadata">

**Author:** ![lazerfalcon](https://avatars.discourse-cdn.com/v4/letter/l/bbe5ce/32.png) [@lazerfalcon](https://forum.juce.com/u/lazerfalcon)\
**Post date:** [April 20, 2021, 8:17pm UTC](https://forum.juce.com/t/projucer-6-0-7-and-later-prepends-srcroot-to-absolute-include-paths/45481/4 "2021-04-20T20:17:29Z")

</div>

Is this fix expected to work for search paths that look like this?  
`$(MYSDK)/include`

I believe that the only reliable solution would be to allow users to indicate whether the paths are expected to be absolute or relative.

Here’s an issue that I encountered that might be related:

> [@XCode projects creation broken after commit 882be2606](https://forum.juce.com/t/xcode-projects-creation-broken-after-commit-882be2606/44971):
>
> Hi guys, I’ve updated to the latest tip (7d71efe6e), rebuilt the Projucer and updated an existing project. XCode can’t open the project due to parsing error, identifying the file as damaged. I’ve tested creating a brand new project from Projucer and the result is the same.

---

<div class="post-metadata">

**Author:** ![ed95](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/ed95/32/7635_2.png) [@ed95](https://forum.juce.com/u/ed95)\
**Post date:** [April 22, 2021, 2:58pm UTC](https://forum.juce.com/t/projucer-6-0-7-and-later-prepends-srcroot-to-absolute-include-paths/45481/5 "2021-04-22T14:58:34Z")

</div>

Can you provide an example of a .jucer file that is causing this issue?

---

<div class="post-metadata">

**Author:** ![lazerfalcon](https://avatars.discourse-cdn.com/v4/letter/l/bbe5ce/32.png) [@lazerfalcon](https://forum.juce.com/u/lazerfalcon)\
**Post date:** [April 23, 2021, 2:04pm UTC](https://forum.juce.com/t/projucer-6-0-7-and-later-prepends-srcroot-to-absolute-include-paths/45481/6 "2021-04-23T14:04:13Z")

</div>

As a “new user”, I’m not authorized to upload files.

```xml
<?xml version="1.0" encoding="UTF-8"?>

<JUCERPROJECT id="Dp6Yze" name="Bad" projectType="audioplug" useAppConfig="0"
              addUsingNamespaceToJuceHeader="0" jucerFormatVersion="1" companyName="BadCompany"
              companyCopyright="2021" companyWebsite="www.BadCompany.com"
              companyEmail="support@BadCompany.com" pluginFormats="buildStandalone,buildVST3"
              headerPath="../../../Common&#10;../../../../../Common&#10;&quot;$(MYSDK)/include&quot;&#10;"
              pluginRTASCategory="2" pluginVST3Category="Dynamics" pluginAAXCategory="2">
  <MAINGROUP id="mcmRfo" name="Bad">
    <GROUP id="{A8499E2A-A3F7-BAB6-82CC-32A0586F5EF2}" name="Source">
      <FILE id="Z4Qug0" name="BcJuceBaseEditor.cpp" compile="1" resource="0"
            file="../Common/BcJuceBaseEditor.cpp"/>
      <FILE id="JURAy4" name="BcJuceBaseEditor.h" compile="0" resource="0"
            file="../Common/BcJuceBaseEditor.h"/>
      <FILE id="P5DrGO" name="BcBaseEffectPluginContext.cpp" compile="1"
            resource="0" file="../../../Common/BcBaseEffectPluginContext.cpp"/>
      <FILE id="qOFOlw" name="BcBaseEffectPluginContext.h" compile="0" resource="0"
            file="../../../Common/BcBaseEffectPluginContext.h"/>
      <FILE id="BvRNdv" name="BcJuceBaseProcessor.cpp" compile="1" resource="0"
            file="../Common/BcJuceBaseProcessor.cpp"/>
      <FILE id="omdlLy" name="BcJuceBaseProcessor.h" compile="0" resource="0"
            file="../Common/BcJuceBaseProcessor.h"/>
      <FILE id="dTeq9M" name="BcJuceLookAndFeel.cpp" compile="1" resource="0"
            file="../Common/BcJuceLookAndFeel.cpp"/>
      <FILE id="AmfGih" name="BcJuceLookAndFeel.h" compile="0" resource="0"
            file="../Common/BcJuceLookAndFeel.h"/>
      <FILE id="KCStti" name="BadProcessor.cpp" compile="1" resource="0"
            file="Source/BadProcessor.cpp"/>
      <FILE id="Cq4WSM" name="BadProcessor.h" compile="0" resource="0"
            file="Source/BadProcessor.h"/>
      <FILE id="RQXrVk" name="BadEditor.cpp" compile="1" resource="0"
            file="Source/BadEditor.cpp"/>
      <FILE id="xgTsVg" name="BadEditor.h" compile="0" resource="0"
            file="Source/BadEditor.h"/>
    </GROUP>
  </MAINGROUP>
  <JUCEOPTIONS JUCE_STRICT_REFCOUNTEDPOINTER="1" JUCE_VST3_CAN_REPLACE_VST2="0"
               JUCE_USE_OGGVORBIS="0" JUCE_USE_FLAC="0" JUCE_USE_MP3AUDIOFORMAT="0"
               JUCE_USE_LAME_AUDIO_FORMAT="0" JUCE_USE_WINDOWS_MEDIA_FORMAT="0"/>
  <EXPORTFORMATS>
    <VS2019 targetFolder="Builds/VisualStudio2019" externalLibraries="BcBadFX.lib">
      <CONFIGURATIONS>
        <CONFIGURATION isDebug="1" name="Debug" targetName="Bad" libraryPath="$(MYSDK)/Windows/Debug/lib"/>
        <CONFIGURATION isDebug="0" name="Release" targetName="Bad" libraryPath="$(MYSDK)/Windows/Release/lib"/>
      </CONFIGURATIONS>
      <MODULEPATHS>
        <MODULEPATH id="juce_audio_basics" path="../../modules"/>
        <MODULEPATH id="juce_audio_devices" path="../../modules"/>
        <MODULEPATH id="juce_audio_plugin_client" path="../../modules"/>
        <MODULEPATH id="juce_audio_processors" path="../../modules"/>
        <MODULEPATH id="juce_audio_utils" path="../../modules"/>
        <MODULEPATH id="juce_core" path="../../modules"/>
        <MODULEPATH id="juce_data_structures" path="../../modules"/>
        <MODULEPATH id="juce_events" path="../../modules"/>
        <MODULEPATH id="juce_graphics" path="../../modules"/>
        <MODULEPATH id="juce_gui_basics" path="../../modules"/>
        <MODULEPATH id="juce_gui_extra" path="../../modules"/>
        <MODULEPATH id="juce_audio_formats" path="../../modules"/>
      </MODULEPATHS>
    </VS2019>
    <XCODE_MAC targetFolder="Builds/MacOSX" externalLibraries="BcBadFX">
      <CONFIGURATIONS>
        <CONFIGURATION isDebug="1" name="Debug" libraryPath="$(MYSDK)/Mac/Debug/lib"/>
        <CONFIGURATION isDebug="0" name="Release" libraryPath="$(MYSDK)/Mac/Release/lib"/>
      </CONFIGURATIONS>
      <MODULEPATHS>
        <MODULEPATH id="juce_audio_basics" path="../../modules"/>
        <MODULEPATH id="juce_audio_devices" path="../../modules"/>
        <MODULEPATH id="juce_audio_plugin_client" path="../../modules"/>
        <MODULEPATH id="juce_audio_processors" path="../../modules"/>
        <MODULEPATH id="juce_audio_utils" path="../../modules"/>
        <MODULEPATH id="juce_core" path="../../modules"/>
        <MODULEPATH id="juce_data_structures" path="../../modules"/>
        <MODULEPATH id="juce_events" path="../../modules"/>
        <MODULEPATH id="juce_graphics" path="../../modules"/>
        <MODULEPATH id="juce_gui_basics" path="../../modules"/>
        <MODULEPATH id="juce_gui_extra" path="../../modules"/>
        <MODULEPATH id="juce_audio_formats" path="../../modules"/>
      </MODULEPATHS>
    </XCODE_MAC>
  </EXPORTFORMATS>
  <MODULES>
    <MODULE id="juce_audio_basics" showAllCode="1" useLocalCopy="0" useGlobalPath="0"/>
    <MODULE id="juce_audio_devices" showAllCode="1" useLocalCopy="0" useGlobalPath="0"/>
    <MODULE id="juce_audio_formats" showAllCode="1" useLocalCopy="0" useGlobalPath="0"/>
    <MODULE id="juce_audio_plugin_client" showAllCode="1" useLocalCopy="0"
            useGlobalPath="0"/>
    <MODULE id="juce_audio_processors" showAllCode="1" useLocalCopy="0" useGlobalPath="0"/>
    <MODULE id="juce_audio_utils" showAllCode="1" useLocalCopy="0" useGlobalPath="0"/>
    <MODULE id="juce_core" showAllCode="1" useLocalCopy="0" useGlobalPath="0"/>
    <MODULE id="juce_data_structures" showAllCode="1" useLocalCopy="0" useGlobalPath="0"/>
    <MODULE id="juce_events" showAllCode="1" useLocalCopy="0" useGlobalPath="0"/>
    <MODULE id="juce_graphics" showAllCode="1" useLocalCopy="0" useGlobalPath="0"/>
    <MODULE id="juce_gui_basics" showAllCode="1" useLocalCopy="0" useGlobalPath="0"/>
    <MODULE id="juce_gui_extra" showAllCode="1" useLocalCopy="0" useGlobalPath="0"/>
  </MODULES>
  <LIVE_SETTINGS>
    <WINDOWS buildEnabled="1"/>
  </LIVE_SETTINGS>
</JUCERPROJECT>

```

---

<div class="post-metadata">

**Author:** ![ed95](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/ed95/32/7635_2.png) [@ed95](https://forum.juce.com/u/ed95)\
**Post date:** [April 23, 2021, 2:26pm UTC](https://forum.juce.com/t/projucer-6-0-7-and-later-prepends-srcroot-to-absolute-include-paths/45481/7 "2021-04-23T14:26:49Z")

</div>

If you remove the quotes around the `"$(MYSDK)/include"` header search path it’ll fix the Xcode project parsing error.

---

<div class="post-metadata">

**Author:** ![KoenTanghe](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/koentanghe/32/533_2.png) [@KoenTanghe](https://forum.juce.com/u/KoenTanghe)\
**Post date:** [July 15, 2021, 8:24pm UTC](https://forum.juce.com/t/projucer-6-0-7-and-later-prepends-srcroot-to-absolute-include-paths/45481/8 "2021-07-15T20:24:18Z")

</div>

I am running into this same bug and am not planning to move to the develop branch while I’m in the process a preparing a new release with the latest master branch (6.0.8).

Can this fix also be added to master please?

I was trying to use the string ~/SDKs/VST\_SDK/VST3\_SDK for the VST legacy SDK folder parameter of my macOS exporter, and this ends up as $(SRCROOT)/~/SDKs/VST\_SDK/VST3\_SDK in the Xcode project, which doesn’t work.  
I am also saving the Projucer project on Windows.
