Menu

#320 Path Identification error

closed
Windows (49)
5
2009-06-19
2009-05-23
Rahul Gupta
No

Whenever I start Geany, It refuses to compile any program (I use C++). I found that in Preferences>Tools if you erase and reapply the make path (MinGW is installed in nonstandard directory ie c:/program file/MinGW/bin/mingw32-make) and project file are in a third folder, the programs start comiling again. This repeats on every restart of geany.

Also is there a way where I can manually specify each and every path? If not this feature will be appriciated.

Geany .17 using MinGW 5.1.4 on Windows XP SP3

Discussion

  • Enrico Tröger

    Enrico Tröger - 2009-05-26

    I'm not sure what exactly you mean, sorry.

    First, you can specify the compiler commands in Build->Set Includes and Arguments.

    By default, Geany uses "make" when any Make commands are invoked (Make All, Make Custom, Make Object) but as you know the command can be changed in the preferences dialog. But Geany can't detect your mingw32-make.exe in "c:/program file/MinGW/bin/mingw32-make". Geany just looks for "make.exe" in the PATH environment variable.

    Please describe your exact problem in more detail, thanks.

     
  • Enrico Tröger

    Enrico Tröger - 2009-05-26
    • assigned_to: nobody --> eht16
     
  • Rahul Gupta

    Rahul Gupta - 2009-05-27

    I thought under Preferences>Tools>tool Paths one can specify the entire path for the tool as I do for "c:/program file/MinGW/bin/mingw32-make.exe". I am sorry for my lack of knowledge, but where are the path environment variable specified. I was under the impression that Geany was using MinGW-make.exe.

    And how does reapplying the MinGW-make location in Preferences>Tools>tool Paths again after a restart allow geany to start making again?

     
  • Enrico Tröger

    Enrico Tröger - 2009-05-27

    > I thought under Preferences>Tools>tool Paths one can specify the entire path for the tool as I do for "c:/program file/MinGW/bin/mingw32-make.exe".

    Yes, of course. This should work at least when there are no spaces in the path. I just fixed the code for the case the path contains spaces.

    But anyway, Geany should remember whatever you entered in the preferences dialog after you closed the dialog. Do you use multiple instances of Geany or something else unusual?

     
  • Enrico Tröger

    Enrico Tröger - 2009-05-27

    I forgot to mention, it'd be cool if you could test the changes. You can find nightly builds on http://nightly.geany.org/win32/ (be sure to download after they have been rebuilt, next time at 06:00 UTC)

     
  • Rahul Gupta

    Rahul Gupta - 2009-05-27

    I will let you know in a few days time...

     
  • Rahul Gupta

    Rahul Gupta - 2009-06-05

    The issue still seems to occur in the new build.

    To recap: Geany refuses to compile a program on startup. Erase and respecify make.exe location and everything is alright!

    I do nothing unusual aprt from installing mingw in a non standard directory, but hey, I specify the full path for the make.exe.

    In Build>Set and include arguments, I only specify filename without path (default). I am wondering if this erase and rewrite in tools>preferences allows it to somehow rediscover the paths for everything. (Since g++ and Mingwmake are in the same directory)

    Also I know this does not belong here, but where can the #include path be modified. I specify it as iostream.h and not the modern way because it is not reading the later.

     
  • Enrico Tröger

    Enrico Tröger - 2009-06-05

    > To recap: Geany refuses to compile a program on startup. Erase and
    > respecify make.exe location and everything is alright!

    Just for clarity, when you say "Compile" you actually mean one of the Make commands, right? Because Geany has also a Compile command which is something different.
    Anyway, I still don't understand why Geany doesn't remember the entered Make path on your system. Are any other settings of the preferences dialog saved?

    > In Build>Set and include arguments, I only specify filename without path

    You don't need to change anything in this dialog when you use any of the Make commands (Make All, Make Custom, Make Object).

     
  • Rahul Gupta

    Rahul Gupta - 2009-06-06

    When I try make I get this error:
    C:\Program Files\MinGW\bin\mingw32-make.exe car.o (in directory: C:\My Work\Thesis)
    g++ -c -o car.o car.cpp
    g++: installation problem, cannot exec `cc1plus': No such file or directory
    mingw32-make: *** [car.o] Error 1
    Compilation failed.

    The program does not compile at startup but once I respecify the make location, it Compiles (I mean compiles). After That making is error free.

     
  • Enrico Tröger

    Enrico Tröger - 2009-06-07

    So, we are talking about the 'Make Object' command I guess from your log.

    See the attached screenshot like it works on my system, I tried to emulate your use case by creating dummy directories with spaces. In \tmp\test inc\ the source file resides while the used mingw32-make.exe is in c:\mingw\test inc 2345\.

    > g++: installation problem, cannot exec `cc1plus': No such file or directory

    Maybe this indicates the cause of the whole problem: g++ itself can't find its own files. But this is in no way related to Geany, it tells that your setup is broken. I strongly suggest to add your mingw bin directory to the PATH environment variable.

    After all, I also would strongly suggest to *not* use paths containing spaces. This always causes problems and should never have been allowed, IMHO. The main problem is probably that spaces are also used to separate command line arguments from executables so you either can't separate them anymore or you need to quote a lot which is by no means as trivial as it may sound.

     
  • Enrico Tröger

    Enrico Tröger - 2009-06-07

    It should look and work like this

     
  • Rahul Gupta

    Rahul Gupta - 2009-06-07

    Adding MinGW/bin to PATH Environment variable has no effect. But Reinstalling MinGW to c:\MinGW eliminates the error. So its spaces thats the problem I guess???

    Thanks for the help!

     
  • Enrico Tröger

    Enrico Tröger - 2009-06-09

    Obviously the spaces in the path are part of the problem but it works fine on my system, so I don't know really what's wrong and how to improve that. Also not sure whether it really needs to be improved, spaces in paths suck, really.

    Can we close this or still problems?

     
  • Rahul Gupta

    Rahul Gupta - 2009-06-19
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB