Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] One of the reasons why wndows support is not so great.

Rereading this I see an error.

"will not expand ConfigName" should say

will not expand ConfigName and remove the \

Op 20/02/2020 om 15:22 schreef Jan Baeyens:

Hi all

I have created a bug report that creates some unlikely to happen and  hard to understand behaviour that is most likely to happen on windows os.

When working with environment variables \ is used to avoid macro expansion.

Because of that something like

will not expand ConfigName
will not expand correctly on windows because DirectoryDelimiter will expand to \ before ConfigName is handled.

Though I think the code could be improved so that at least ${ProjDirPath}${DirectoryDelimiter}${ConfigName} works properly the real issue is that the use of \ as escape key is a bad choice in windows environment variables.

As to the impact of (not) changing the escape key. I fear the key is at least used by CDT gnu managed build. But more importantly, replacing \ by another key will cause compatibility issues. Keeping it will mean: "remaining with occasional weird windows problems"


PS Don't get me wrong, I do not think this is a urgent issue. It is however important to understand windows specific issues.
I worked around it by doing the expansion myself
        //work around needed because of
        //it should have been
        // in pre_processing_platform_default.txt
        String buildPath=confDesc.getProjectDescription().getProject().getLocation().append(confDesc.getName()).toOSString();
        setBuildEnvironmentVariable(contribEnv, confDesc, "A.BUILD.PATH", buildPath);
        //end of workaround

cdt-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top