Hi all
I just noticed that build is now enabled on Windows.
make seems to work, but I think there is an issue with plain compile:
I created a hello.c and invoked compile, which resulted in the following output:
gcc -Wall -c "hello.c" (in directory d:\dev\hell) gcc: "hello.c": Invalid argument gcc: No input files Compilation finished
What seems to happen is that geany somehow "overquotes" the filename, as I get the same result, when on cmd.exe, when I type:
gcc -Wall -c ""hello.c""
If I type
gcc -Wall -c "hello.c"
It works.
I assume therefore that on windows, gcc is not called from a shell, but directly with exec, where the quotes are not being removed.
Tried to fix this myself, but I couldn't find the relevant bits in build.c.
Bye Tim
On Fri, 02 Nov 2007 13:34:23 +0100, Tim Tassonis timtas@cubic.ch wrote:
Hi all
I just noticed that build is now enabled on Windows.
make seems to work, but I think there is an issue with plain compile:
I created a hello.c and invoked compile, which resulted in the following output:
gcc -Wall -c "hello.c" (in directory d:\dev\hell) gcc: "hello.c": Invalid argument gcc: No input files Compilation finished
What seems to happen is that geany somehow "overquotes" the filename, as I get the same result, when on cmd.exe, when I type:
gcc -Wall -c ""hello.c""
If I type
gcc -Wall -c "hello.c"
It works.
Yes, I just discovered this too. It is in some way related to the Windows API, there is something handled differently to Unix systems but I'm sure we will find a fix. As a workaround, go in the build menu, "Set Includes and Arguments" and remove all the quotes around any %f and %e wildcards. This should work for hello.c, this won't work for 'hello world.c' ;-(.
Regards, Enrico
On Fri, 2 Nov 2007 13:44:10 +0100, Enrico Tröger enrico.troeger@uvena.de wrote:
On Fri, 02 Nov 2007 13:34:23 +0100, Tim Tassonis timtas@cubic.ch wrote:
Hi all
I just noticed that build is now enabled on Windows.
make seems to work, but I think there is an issue with plain compile:
I created a hello.c and invoked compile, which resulted in the following output:
gcc -Wall -c "hello.c" (in directory d:\dev\hell) gcc: "hello.c": Invalid argument gcc: No input files Compilation finished
What seems to happen is that geany somehow "overquotes" the filename, as I get the same result, when on cmd.exe, when I type:
gcc -Wall -c ""hello.c""
If I type
gcc -Wall -c "hello.c"
It works.
Yes, I just discovered this too. It is in some way related to the Windows API, there is something handled differently to Unix systems but I'm sure we will find a fix. As a workaround, go in the build
Should be fixed in SVN r2012.
Is it my crappy Windows system or is the run command broken? I get an error message saying failed to execute helper program. Before searching for a fix, can anyone confirm this by e.g. just executing a simple .bat file?
Regards, Enrico
On Sun, 4 Nov 2007 11:01:22 +0100, Enrico Tröger enrico.troeger@uvena.de wrote:
Is it my crappy Windows system or is the run command broken? I get an
The Run command was broken for quite a long time. I tried to fix it in SVN r2017 together with a couple of other small improvements to the build code. It might be that currently something else of the build related code is broken, I will continue working on this soon.
Any feedback is welcome, I'll provide a SVN binary for Windows soon.
Regards, Enrico
Enrico Tröger wrote:
On Sun, 4 Nov 2007 11:01:22 +0100, Enrico Tröger enrico.troeger@uvena.de wrote:
Is it my crappy Windows system or is the run command broken? I get an
The Run command was broken for quite a long time. I tried to fix it in SVN r2017 together with a couple of other small improvements to the build code. It might be that currently something else of the build related code is broken, I will continue working on this soon.
Any feedback is welcome, I'll provide a SVN binary for Windows soon.
Seems to work all fine for me, both the stuff with quoting filenames as well as executing a command.
The only thing I notice on windows is that errors reported by make (invoking gcc) don't come back to the compiler window.
Bye Tim
On Tue, 06 Nov 2007 10:39:22 +0100, Tim Tassonis timtas@cubic.ch wrote:
Enrico Tröger wrote:
On Sun, 4 Nov 2007 11:01:22 +0100, Enrico Tröger enrico.troeger@uvena.de wrote:
Is it my crappy Windows system or is the run command broken? I get an
The Run command was broken for quite a long time. I tried to fix it in SVN r2017 together with a couple of other small improvements to the build code. It might be that currently something else of the build related code is broken, I will continue working on this soon.
Any feedback is welcome, I'll provide a SVN binary for Windows soon.
Seems to work all fine for me, both the stuff with quoting filenames as well as executing a command.
And stopping a command(using the stopm menu item/toolbar button) should also work now. There was an additional problem when any of the tools(make.exe, gcc.exe, g++.exe, ...) was specified with the full path. By parsing the backslashes were removed before the command was executed and so it failed (Geany tried to execute e.g. c:mingwbinmake.exe). I addded some code to fix this by quoting the first element of the command line and it seems to work. If anyone experiences problems, please report them.
The only thing I notice on windows is that errors reported by make (invoking gcc) don't come back to the compiler window.
As Nick, I'm not sure but I guess it might be related to the used make binary. We experienced similar problems with svn and grep.
There is still another problem: Sometimes, the build commands(Compile, Build, Execute) won't work giving a message that the child process couldn't be found. I still don't know when exactly it happens and why. I will try to fix it. At the moment, the only thing which helps is to restart Geany once it happened. Maybe there is somewhere still a change of the working directory which could cause this. Still no idea.
Regards, Enrico
On 02/11/07 12:34:23, Tim Tassonis wrote:
Hi all
I just noticed that build is now enabled on Windows.
Yes, I thought getting some kind of build support would be good, but it probably needs some tweaking.
make seems to work, but I think there is an issue with plain compile:
I created a hello.c and invoked compile, which resulted in the following output:
gcc -Wall -c "hello.c" (in directory d:\dev\hell) gcc: "hello.c": Invalid argument gcc: No input files Compilation finished
What seems to happen is that geany somehow "overquotes" the filename, as I get the same result, when on cmd.exe, when I type:
gcc -Wall -c ""hello.c""
If I type
gcc -Wall -c "hello.c"
It works.
I assume therefore that on windows, gcc is not called from a shell, but directly with exec, where the quotes are not being removed.
Tried to fix this myself, but I couldn't find the relevant bits in build.c.
At the moment the command line is just split up on every space, so filenames with spaces won't work (although paths will). The quotes become part of the filename. A workaround is to remove the quotes from the compile & build commands for the filetype you want to use. But of course the code could/should be improved to support quotes.
Regards, Nick
Hi Nick, Enrico
At the moment the command line is just split up on every space, so filenames with spaces won't work (although paths will). The quotes become part of the filename. A workaround is to remove the quotes from the compile & build commands for the filetype you want to use. But of course the code could/should be improved to support quotes.
Well, I can well live with that restriction. I won't repeat on this list how I call people putting blanks in source file names...
Thanks Tim
Regards, Nick _______________________________________________ Geany mailing list Geany@uvena.de http://uvena.de/cgi-bin/mailman/listinfo/geany
On Fri, 02 Nov 2007 13:57:59 +0100, Tim Tassonis timtas@cubic.ch wrote:
Hi Nick, Enrico
At the moment the command line is just split up on every space, so filenames with spaces won't work (although paths will). The quotes become part of the filename. A workaround is to remove the quotes from the compile & build commands for the filetype you want to use. But of course the code could/should be improved to support quotes.
Well, I can well live with that restriction. I won't repeat on this list how I call people putting blanks in source file names...
I do ;-), spaces in filenames(as well as other non-Ascii characters) are one of the worst improvements ever.
Btw, if you are testing the code, I just committed some exit code detection for Windows. I have no idea whether it works reliable but a few tests seemed to be good.
Regards, Enrico
Enrico Tröger wrote:
On Fri, 02 Nov 2007 13:57:59 +0100, Tim Tassonis timtas@cubic.ch wrote:
Hi Nick, Enrico
At the moment the command line is just split up on every space, so filenames with spaces won't work (although paths will). The quotes become part of the filename. A workaround is to remove the quotes from the compile & build commands for the filetype you want to use. But of course the code could/should be improved to support quotes.
Well, I can well live with that restriction. I won't repeat on this list how I call people putting blanks in source file names...
I do ;-), spaces in filenames(as well as other non-Ascii characters) are one of the worst improvements ever.
Btw, if you are testing the code, I just committed some exit code detection for Windows. I have no idea whether it works reliable but a few tests seemed to be good.
Seems to work perfectly! Both make and compile now report "Compilation failed" when I get an error and "successful" when it is.
The only difference to unix I now see is the missing automatic error line detection stuff, but this is already great!
Thanks a lot, geany truly rocks!
Tim
On 02/11/07 13:14:52, Tim Tassonis wrote:
Enrico Tröger wrote:
On Fri, 02 Nov 2007 13:57:59 +0100, Tim Tassonis timtas@cubic.ch wrote: Btw, if you are testing the code, I just committed some exit code detection for Windows. I have no idea whether it works reliable but
a
few tests seemed to be good.
Seems to work perfectly! Both make and compile now report "Compilation failed" when I get an error and "successful" when it is.
The only difference to unix I now see is the missing automatic error line detection stuff, but this is already great!
Hmm, when I tried the compile command with gcc the error line indicators worked as expected. Maybe there's a problem with the Make command on Windows - do you have any extra info?
Thanks a lot, geany truly rocks!
:)
BTW, for anyone who remembers the original discussion months ago, Windows 2000 GIOChannel IO redirection does work, like XP, it's just that I was using the wrong grep.exe from MSYS - works fine with UnxUtils grep, MinGW gcc.exe, etc :p
Regards, Nick
Hi Nick
The only difference to unix I now see is the missing automatic error line detection stuff, but this is already great!
Hmm, when I tried the compile command with gcc the error line indicators worked as expected. Maybe there's a problem with the Make command on Windows - do you have any extra info?
Stupid me, I switched off the error indicators on windows, as build wasn't supported previously.
Now, when I switch them on, all is fine.
Sorry for that.
Bye Tim