Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Compiler Framework Redesign => Topic started by: ollydbg on January 05, 2012, 04:01:10 pm

Title: detect space in file path when use MinGW
Post by: ollydbg on January 05, 2012, 04:01:10 pm
Currently MinGW can not handle this, can we add some check on this. A lot of beginner will meet this issue.

This is only thought came to my mind.
Title: Re: detect space in file path when use MinGW
Post by: oBFusCATed on January 05, 2012, 04:20:56 pm
Patches welcome :)
Title: Re: detect space in file path when use MinGW
Post by: MortenMacFly on January 05, 2012, 07:51:20 pm
Currently MinGW can not handle this, can we add some check on this. A lot of beginner will meet this issue.
What exactly do you mean? I have all of my projects in a path with spaces ("My Files") and I never experienced any issues so far.
Title: Re: detect space in file path when use MinGW
Post by: stahta01 on January 05, 2012, 09:16:46 pm
Currently MinGW can not handle this, can we add some check on this. A lot of beginner will meet this issue.
What exactly do you mean? I have all of my projects in a path with spaces ("My Files") and I never experienced any issues so far.

I have noticed the windres.exe having intermittent issues with spaces in the path in the past few years.
By intermittent, I mean some versions have the issues others do not.

Tim S.
Title: Re: detect space in file path when use MinGW
Post by: zabzonk on January 05, 2012, 09:30:46 pm
To quote from http://www.mingw.org/wiki/Getting_Started


Quote
MinGW may have problems with paths containing spaces, and if not, usually other programs used with MinGW will experience problems with such paths. Thus, we strongly recommend that you do not install MinGW in any location with spaces in the path name reference; i.e. you should avoid installing into any subdirectory of "Program Files" or "My Documents", or the like.

Presumably the OP's idea is that if CB detects that MinGWGCC is installed in such a directory, it should issue a warning?

Title: Re: detect space in file path when use MinGW
Post by: ollydbg on January 06, 2012, 02:01:36 am
Currently MinGW can not handle this, can we add some check on this. A lot of beginner will meet this issue.
What exactly do you mean? I have all of my projects in a path with spaces ("My Files") and I never experienced any issues so far.
I mean that the source file path may contain spaces.
It looks like it is OK now as you put your project files under "My Files" folder without  any problem. ;)
But why some user still have such problem? Maybe like stahta01 said, only "windres.exe" has this issue.

To quote from http://www.mingw.org/wiki/Getting_Started


Quote
MinGW may have problems with paths containing spaces, and if not, usually other programs used with MinGW will experience problems with such paths. Thus, we strongly recommend that you do not install MinGW in any location with spaces in the path name reference; i.e. you should avoid installing into any subdirectory of "Program Files" or "My Documents", or the like.

Presumably the OP's idea is that if CB detects that MinGWGCC is installed in such a directory, it should issue a warning?
So, the mingw installed path should not have spaces? right.
This can be checked when the user setting the mingw compiler path.

Here is another thing we can check:
In the compiler's installation directory setting dialog, there are some statement:
Code
NOTE: All programs below, must exist either in the "bin" sub-directory of this path or in any of the "Additional paths"...
So, the first half, can we check there is a "bin" sub-directory in the user setting path? If not, we can give a warning messagebox.