Menu

Cant change compiler pointing to wrong directory for g++.exe

Compiling
Joel
2015-01-24
2015-01-30
  • Joel

    Joel - 2015-01-24

    I am running Dev-C++ with MinGW compiler under Vista. My source files are in C:\Devc. I loaded MinGW into C:\MinGW. With Compiler Options, I set binaries,libraries and include to C:\MinGW\bin,C:\MinGW\lib,and C:\MinGW\include, respectively. I go to compile a very simple Hello World.cpp located in C:\Devc and I keep getting " C:\Devc\g++.exe [Error] Create Process, no such file or directory". Where have I told Dev-C++ to go look for g++.exe in C:\Devc? I already have C:\MinGW\bin as the FIRST variable in my PATH. Why does Dev-C++ look for g++.exe in C:\Devc?

     
  • Joel

    Joel - 2015-01-27

    Any chance someone can tell me why this compiler defaults to the location of C:\devc\g++.exe as the location for the compiler executable? I never set that as the location. It is located in C:\minGW\bin, just where u would expect it to be.

     
  • SilverNexus

    SilverNexus - 2015-01-27

    It sounds as though Dev-C++ may have a place where an executable path was either accidentally hardcoded or pathed with the wrong variable.

    Of the two, I'd guess g++.exe was pathed to the main Dev-C++ folder, when it should have been pathed to the compiler folder. Thus, it looks for g++.exe in C:/Devc and not in C:/minGW/bin.

    Double (triple, quadruple, whatever it may be) check any pathing parameters you've changed, just to make sure it should be pointing to C:/MinGW/bin.

    If I was in Windows right now, I would make a build that has those folders as paths. But I'm not, so I'll reboot soon and see if I can recreate it with Dev-C++ 5.9.0.


    EDIT: I was unable to recreate this with Dev-C++ 5.9.0 on Windows 8. I used the compiler-less version of the setup, installed mingw32 separately, added the mingw32 directory as a compiler set, and it worked fine. Dev-C++ was installed to C:/devc and MinGW was installed to C:/MinGW32.

     

    Last edit: SilverNexus 2015-01-27
    • Joel

      Joel - 2015-01-30

      I thank you very much for your kind response. I know this appears to be a basic setup problem but it is frustrating when I see that somehow C:\devc has become the directory where the g++.exe compiler engine has been pointed to. I also took the approach of just getting a very simple C++ file to compile on the command line, outside of Dev-C++. I do believe this problem has nothing to do with Dev-C++ since I can't even compile from a C:\ command line such as C:\minGW\bin\g++.exe c:\devc\mytest.cpp. I still get that very well known error of "[Error] Create Process, no such file or directory" This error message is addressed in many forums as being due to an improper environment variable being set or other setup problems that are very basic to getting minGW to run in the first place. So, I am now focused on just getting this simple C++ source file to compile from a command line. Basically, the forum answers are just assign C:\minGW\bin as your FIRST environmental variable and the g++.exe file should compile source files just fine. Despite my doing that, I still get that same error message.

       
  • opeoluwa

    opeoluwa - 2017-03-10

    pls how can i solve this problem ...

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.