c++ - Windows 7(32 位)上带有 libstdc++-6.dll 的 clang++ 3.2

标签 c++ windows clang++

在 Stackoverflow 上大量搜索并通过谷歌搜索我的问题后,我仍然无法运行使用 clang++ 3.2 构建的 .EXE 文件。

"clang++"将 .BC 文件编译成 .EXE 时没有报错。当我尝试运行 .EXE 文件时,它突然终止了程序。

Error Message when I execute a program

谁能帮我解决这个问题?

我已经尝试使用-static-libstdc++-6/libstdc++,但问题依然存在。

旁注:使用 g++ 编译的可执行文件没有任何问题并且运行良好。

已编辑:

我的代码:

#include <iostream>

using namespace std;

int main(){

int a=0;
cin>>a;
cout<<a<<endl;
return 0;

}

最佳答案

如果您使用 gcc 4.7.0 或更高版本,请尝试 Making Clang work with MinGW GCC 4.7's libstdc++ .

关于c++ - Windows 7(32 位)上带有 libstdc++-6.dll 的 clang++ 3.2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18541647/

相关文章:

c++ - map 的二维数组替代

windows - "continue"Windows Batch 中嵌套循环中的等效命令

C++ 类返回具有新地址的引用

c++ - 由于意外的模板参数类型推导而导致的无限递归

c++ - 在通用 lambda 中使用 constexpr-if 来确定参数的类型

python - 在 Windows 下如何共享日志文件?

windows - 优雅地退出资源管理器(以编程方式)

c++ - 如何将 boost_threads 与 clang 一起使用?

c++ - 与 unique_ptr 配对的正确方法是什么?

c++ - 导出从另一个模块导入的类