Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » "libstdc++-6.dll was not found" & "libgcc_s_dw2-1.dll was not found"
"libstdc++-6.dll was not found" & "libgcc_s_dw2-1.dll was not found" [message #1843589] Tue, 10 August 2021 00:04 Go to next message
Daniel Sullivan is currently offline Daniel SullivanFriend
Messages: 1
Registered: August 2021
Junior Member
Hi! I'm taking a C++ class and I've been using Eclipse on Windows 10 to write .cpp files.

Everything has been going great! Lab or Homework Problems usually are along the lines of:

"Write a program that prompts the user to enter in Weight and Height and returns their BMI"

Easy enough: I go to File > New > C/C++ Project > C++ Managed Build > I then give a project name, say "BMI Calculator" > I choose the "Hello World C++ Project" (because I was having issue when I chose "Empty Project") > I choose "MinGW GCC" for my toolchain > Finish

Then in the Project Explorer, I expand my "BMI Calculator" project > expand the "src" folder > and I find my .cpp file.

I'll edit the file, writing code that successfully completes it's job.

When I want to run the program to test it and see if it works, I'll go to File > Save All, then I'll go to Project > Build All, and then I'll go to Run > Run As > Local C/C++ Application. I can see the proper outputs in the convenient "Console" window beneath the open .cpp file I had just created, edited, and saved above. In past problems, I've read in user-entered values from the console window, displayed program outputs to this console window, the whole 9-yards. You know, like a real pro.

We got a new problem this week, write a program that determines if a year is a leap year or not. Easy enough, (a year is a leap year if it is divisible by 4 and not divisible by 100, unless it is also divisible by 400). It's not the problem I'm having trouble with, it's the fact that I need to be able to execute this program from cmd.exe, and I need to pass a value (a single year i.e. 1994, 2004, 2021, etc.) from the command line to the program!

I know, I'm sure this seems trivial, but I've been struggling with it.

I found that Eclipse makes .exe files of your .cpp files. I was able to navigate to the directory that has the .exe file that corresponds to my .cpp file in Windows File Explorer and in cmd.exe, but when I try to run the .exe file in cmd.exe (I go to the folder that has the .exe file and just type [filename].exe), I get two errors:

"The code execution cannot proceed because libstdc++-6.dll was not found. Reinstalling the program may fix this problem"


"The code execution cannot proceed because libgcc_s_dw2-1.dll was not found. Reinstalling the program may fix this problem"

What am I doing wrong? I have the MinGW compiler installed on my Windows machine, so I don't know what I'm doing wrong.

Additionally I have absolutely no idea how to edit my .cpp file in Eclipse to allow arguments to pass from cmd.exe, and I have absolutely no idea how to make use of passed values in the .cpp file itself. I've read a bunch of articles on it, but it still makes no sense to me.

One problem at a time, thought.

Would greatly appreciate any help.
Re: "libstdc++-6.dll was not found" & "libgcc_s_dw2-1.dll was not found" [message #1843590 is a reply to message #1843589] Tue, 10 August 2021 01:39 Go to previous message
David VavraFriend
Messages: 1407
Registered: October 2012
Senior Member
This is how Windows searches for DLLs:
Previous Topic:hack project source location
Next Topic:Managed build - how to prevent full rebuild of upstream projects?
Goto Forum:

Current Time: Mon Dec 06 21:44:55 GMT 2021

Powered by FUDForum. Page generated in 0.01250 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top