-1

Eclipse will terminate itself with exit value -1,073,741,511 after include string and a string variable is defined. The program will be fine with the string variable commented out.

There was no error message saying the string cannot be resolved.

May I know how to fix that?

Thanks

HighCommander4
  • 50,428
  • 24
  • 122
  • 194
Zack
  • 147
  • 2
  • 10
  • Without seeing the code, one can only guess at what the issue might be. – HighCommander4 Sep 19 '18 at 02:00
  • @HighCommander4 dude, why you need code, it's just #include; then using namepace std; and define a variable in your main method. I've found a solution by myself. If you voted down to my question, would you mind to vote it up? If not, would you mind to vote it up anway? – Zack Sep 20 '18 at 01:23
  • 1
    I'm not the one who voted down your question, but I'm also not going to vote it up. We can't be expected to read your mind and know that your code is "just ", you have to say so, and the best way to say it is by just including the code in the question. – HighCommander4 Sep 20 '18 at 01:39

1 Answers1

1

Finally I solved the problem. Eclipse seems to have problem to connect the libstdc++-6.dll file. In order to make #include and string variables to work, you need to copy that file from minGW to the .exe file path of your project.

Thank you!

Zack
  • 147
  • 2
  • 10
  • This is more of a workaround. You may find the solutions in [this question](https://stackoverflow.com/questions/6404636/libstdc-6-dll-not-found) more convenient. In particular, doing what [this answer](https://stackoverflow.com/a/51599864) suggests should get Windows to automatically find the .dll file (which is in the same `bin` directory) when loading your program. – HighCommander4 Sep 20 '18 at 01:47