Could not be located in the dynamic link library

2019-03-06 03:34发布

i'm having trouble reading from a text file in C++, so basically I want to read the text file on "cmd" using this code, however, an error pops up.

#include <iostream>
#include <fstream>
#include <string>
using namespace::std;
int main()
{
    string line_;
    ifstream file("Seminario.txt");
    if(file.is_open()){
        while(getline(file, line_)){
            cout << line_ << endl;
        }

        file.close();
    }
    else{
        cout << "File is not open" << endl;
        cin.get();
        return 0;
    }
}

When I compile it, I get no errors, however, when I run a.exe, a window pops up saying:

The procedure entry point _ZNSt7__cxx1112basic_stringlcSt11char_traitslcESalcEEC1Ev could not be located in the dynamic link library C:\Users\pc\Desktop\Progra\a.exe.

How can I fix this?

标签: c++ dll
0条回答
登录 后发表回答