libstdc ++ - 运行c ++程序时缺少6.dll和libgcc_s_dw2-1.dll

时间:2017-02-22 17:31:12

标签: c++ compilation codeblocks

我用C ++创建了一个程序,这只是个玩笑。我想稍微测试一下这些可能性。我构建了程序,通过Code :: Blocks运行它 它起作用了。我前往我保存的目录,从那里运行。

  

程序无法启动,因为您的计算机缺少libstdc ++ - 6.dll。尝试重新安装该程序以解决此问题。

我按了OK,然后是另一个" popup"

  

程序无法启动,因为您的计算机缺少libgcc_s_dw2-1.dll。尝试重新安装该程序以解决此问题。

我的电脑上有这些文件。

我自己尝试修复它,它很愚蠢,但我将这些文件复制到程序本身所在的目录中。

P.S。这是代码,但我认为不重要。

#include <iostream>
#include <vector>
#include <string>
#include <fstream>
#include <cstdlib>
#include <ctime>

using namespace std;
int main(){
int rnum;
char yn;
srand (time(NULL));

cout << "Welcome to my fortune teller!!!"<< endl;
cout << "It uses an extremely futuristic and advanced algorithm!"<< endl;
cout << "if you know your luck, it can easily change, are you sure you want to continue? Y/N"<< endl;
cin >> yn;

if (yn == 'Y'){}
else if (yn == 'y'){}
else {
    return 0;
}


rnum = rand() % 11 + 1;

if (rnum == 1) {
    system("color A1");
    cout << "Bad luck, you're screwed mi friend"<< endl;
}
else if (rnum == 2) {
    cout << "Jump off of a building cuz' you got the lucks"<< endl;
}
else if (rnum == 3) {
    cout << "It's an awkward day for you, I see..."<< endl;
}
else if (rnum == 4) {
    cout << "Sorry man, go home and lock yourself into a closet"<< endl;
}
else if (rnum == 5) {
    cout << "Do risky things today, your luck has hit 100%"<< endl;
}
else if (rnum == 6) {
    cout <<"Quite frankly, I'm not sure, today looks kinda cloudy for you, the sun may shine through though"<< endl;
}
else if (rnum == 7) {
    cout << "Your luck is a bit more on the bad side, it could fix (by the end of the century)" << endl;
}
else if (rnum == 8) {
    cout << "Your luck is a bit on the good side, but don't do dumb things, it can easily fall into the bottomless sea" << endl;
}
else if (rnum == 9) {
    cout << "This is weird, it's balancing right in the middle, look out, it could go bad anytime, or good"<< endl;
}
else if (rnum == 10) {
    cout <<"No comment."<< endl;
}

return 0;

}

0 个答案:

没有答案