From: <sis...@op...> - 2013-03-12 21:13:37
|
Hi Syd, No problem for me with your code and the mingw.org port of gcc-4.7.0: ########################## C:\_32\C>trycpp !!!Hello World!!! Press any key to continue . . . C:\_32\C>type try.cpp #include <iostream> #include <cstdlib> using namespace std; int main() { cout << "!!!Hello World!!!" << endl; system("PAUSE"); return 0; } C:\_32\C>g++ -o trycpp.exe try.cpp C:\_32\C>trycpp !!!Hello World!!! Press any key to continue . . . C:\_32\C> ########################## I don’t know anything about Eclipse, but I suspect it might be messing up your PATH setting. (I think you ought to investigate what it’s doing.) If libstdc++-6.dll is in the bin folder and is not being found, then the bin folder is *not* in the path when it needs to be. A temporary workaround might be to place a copy of libstdc++-6.dll in the cwd (current working directory). That dll should then be locatable and loadable. Cheers, Rob From: Syd Sent: Wednesday, March 13, 2013 7:09 AM To: min...@li... Subject: [Mingw-users] mingw compiler problems still #include <iostream> #include <cstdlib> using namespace std; int main() { cout << "!!!Hello World!!!" << endl; system("PAUSE"); return 0; } This simple line of code is giving me all kinds of greif. On a previous install of mingw this line of code compiled but did not work correctly: it didn't recognize the system(PAUSE) line. The executable file gave an error message of not being able to find libgcc_s_dw2.dll when I tried to run it in a DOS window. I found a copy of this file and tried to install it in the bin directory to no avail. A posting from this site suggested that the compiler installation was incomplete. So I went back to sourceforge and downloaded mingw-get-inst-20120426.exe from the sourceforge site and tried to reinstall a good version of the C++ package. Using the same simple code from above I compiled the code once again and then ran it hoping that the problem was fixed. Still no good! Running it in the debugger and stopping before the system(PAUSE) line, once again the string shows up in the console. And then the system() waits until I press enter, at which time the code exits. This is how the code should run without the debugger! Once again, from the DOS window I ran the exe file and this time a different error shows up! Missing libstdC++-6.dll file. I checked the bin folder and it is in there! I've been trying for three weeks to get the C++ Eclipse version to run this simple program so that I can get on with really doing some development work, but this is getting to be a little frustrating. I have been using Java Eclipse for years without this problem. The C++ version is a different case. I hope that someone can help getting this package to run before I lose my mind. -------------------------------------------------------------------------------- ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar -------------------------------------------------------------------------------- _______________________________________________ MinGW-users mailing list Min...@li... This list observes the Etiquette found at http://www.mingw.org/Mailing_Lists. We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated. _______________________________________________ You may change your MinGW Account Options or unsubscribe at: https://lists.sourceforge.net/lists/listinfo/mingw-users Also: mailto:min...@li...?subject=unsubscribe |