在Windows上使用g ++编译C ++后出现__gxx_personality_v0错误

时间:2016-01-24 20:29:10

标签: c++ windows gcc g++ mingw

标题

成功编译此程序后:

#include <iostream>

class test
{
    public:
    int Render() {return 4;}
};

int main()
{
    test b;
    std::cout << b.Render() << std::endl;   
    return 0;
}

使用此命令:

g++ .\src\test.cpp -lstdc++

生成的可执行文件产生错误消息(在我翻译时解释):

Entry point for procedure __gxx_personality_v0 in library [path of executable] not found.

有什么建议吗?

1 个答案:

答案 0 :(得分:1)

答案:将libstdc ++ 6.dll从C:\ mingw \ bin复制到可执行文件夹中。