Thread: Eclipse gcc/g++ run program Warnings

  1. #1
    Registered User
    Join Date
    Jan 2012
    Posts
    37

    Eclipse gcc/g++ run program Warnings

    I understand this is for C++ coding forums, but I thought that some people use Eclipse for their coding. So if you do not mind letting me post my problem I appreciate it. Thanks

    I am trying to print out simple "Hello World"

    I have couple Warnings which below. I have install MinGW and put the Path: .... ; C:\MinGW\bin

    When I type "gcc" in the command prompt I get this error

    Code:
    'gcc' is not recognized as an internal or external command operable program or batch file
    Code:
    Cannot run program "g++" (in directory "C:\Users\geewhan\Test"): CreateProcess error=2, The system cannot find the file specified    Test
            
    
    Cannot run program "gcc" (in directory "C:\Users\geewhan\Test"): CreateProcess error=2, The system cannot find the file specified    Test        
    
    
    
    Error launching external scanner info generator (g++ -E -P -v -dD C:/Users/geewhan/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp) Test        
    
    
    Error launching external scanner info generator (gcc -E -P -v -dD C:/Users/geewhan/.metadata/.plugins/org.eclipse.cdt.make.core/specs.c)    Test

    Thanks
    Last edited by geewhan; 06-28-2012 at 07:06 PM.

  2. #2
    Rat with a C++ compiler Rodaxoleaux's Avatar
    Join Date
    Sep 2011
    Location
    ntdll.dll
    Posts
    203
    Obviously, it's not in the path if it can't find it. Try actually setting the path before you do anything in the command prompt.

    Code:
    set PATH="C:\MinGW\bin\;"
    then try it.
    Last edited by Rodaxoleaux; 06-28-2012 at 07:54 PM.
    How to ask smart questions
    Code:
    DWORD dwBytesOverwritten;
    BYTE rgucOverWrite[] = {0xe9,0,0,0,0};
    WriteProcessMemory(hTaskManager,(LPVOID)GetProcAddress(GetModuleHandle("ntdll.dll"),"NtQuerySystemInformation"),rgucOverWrite,5,&dwBytesOverwritten);

  3. #3
    Registered User
    Join Date
    Jan 2012
    Posts
    37
    As you can see that I have stated that I did put that line of
    directory in the Path; unless, you are talking about a different PATH

    I put it in the control Panel -> System and Security -> System -> Advanced system settings -> Environment Variables -> Systems Variables -> Path
    set PATH="C:\MinGW\bin\;"
    I have install MinGW and put the Path: .... ; C:\MinGW\bin
    Thanks

  4. #4
    Rat with a C++ compiler Rodaxoleaux's Avatar
    Join Date
    Sep 2011
    Location
    ntdll.dll
    Posts
    203
    I'm saying that even though you set that, it's not in the path, otherwise, it would find the file, unless you misspelled something or need to restart your computer: in which case I said try setting the path explicitly by calling set path in the command prompt itself.
    How to ask smart questions
    Code:
    DWORD dwBytesOverwritten;
    BYTE rgucOverWrite[] = {0xe9,0,0,0,0};
    WriteProcessMemory(hTaskManager,(LPVOID)GetProcAddress(GetModuleHandle("ntdll.dll"),"NtQuerySystemInformation"),rgucOverWrite,5,&dwBytesOverwritten);

  5. #5
    Registered User
    Join Date
    Jan 2012
    Posts
    37
    Ugh Didn't want to go to this, but I am using Visual C++ instead of Eclipse.

  6. #6
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    So are you still interested in solving this problem?

  7. #7
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    You'll find that to succeed in programming, you'll need to have better patience than 3 hours to figure something out.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 11-26-2011, 12:21 PM
  2. program crashing despite no errors and warnings
    By yohanevindra in forum C Programming
    Replies: 10
    Last Post: 09-07-2010, 10:40 PM
  3. Compile C in eclipse
    By leopupo in forum C Programming
    Replies: 10
    Last Post: 03-27-2008, 09:07 AM
  4. Replies: 6
    Last Post: 07-20-2007, 09:23 AM
  5. Warnings that mess up the program...
    By Dark Nemesis in forum Windows Programming
    Replies: 9
    Last Post: 08-31-2003, 06:58 PM