简体   繁体   中英

Getting RUN FAIL (exit value 127) in NetBeans

(Background: I always used to compile c++ codes through cmd-line using g++ at school's computers. It has been a while since I deleted any IDE on my laptop and I have downloaded NetBeans IDE a month ago.)

I am planning to do some c++ program practices and noticed that I'm having "Run failed" with exit value 127 (Build passes). I noticed from other posts that exit value 127 basically means the c++ compiler cannot identify 'string' variable types. Here is my code:

#include <iostream>
#include <string>

using namespace std;


/*
 * 
 */
int main(int argc, char** argv) {
    //Bunny bunny;

    string name;

    return 0;
}

As you can see, I have called <string> library that theoretically should enable the compiler to recognise string data type (or avoid run fail).

Edit: Here is the message regarding the 'Run fail' -

RUN FAILED (exit value 127, total time: 16ms)

My guess is that I need to install a program along with NetBeans for this to pass at 'Run'. I am quite bad at what is needed to install. Any help/suggestions will be appreciated.

Okay, I have found a solution to my problem. This page had the same problem as me Why are all my C++ programs exiting with 0xc0000139? @Zell Faze. The steps I took to (identify my problem and) find that solution page was: I ran my c++ string code in debug mode and got the error code of 0xc0000139 and eventually found the solution page. So, to everyone in the future the cygwin modules for gcc-core and gcc-g++ latest versions had this bug where they didn't recognise string variables. I downgraded to version 4.9.3, same as Zell Faze in the referenced site. Hope this helps anyone (including the future forgetful me).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM