g ++不会产生任何文件或提供任何输出 [英] g++ does not make any file or give any output

查看:69
本文介绍了g ++不会产生任何文件或提供任何输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始使用g ++,从网站上下载了最新版本,并且编写了一个简单的HelloWorld程序.

I've just started using g++, downloading the latest version from the site, and I've made a simple HelloWorld program.

#include <iostream>
using namespace std;
int main()
{
  cout << "Hello World!" << endl;
  return 0;
}

当我尝试使用Powershell窗口和g ++执行时,在正确的目录中,我使用以下命令:

When I try to execute using the powershell window and g++, in the right directory, I use the following command:

g++ HelloWorld.cpp -o HelloWorld.exe

这没有输出,也没有文件.我根据在该站点上阅读的其他答案使用了-v命令,它给了我这一点.我不知道如何继续执行程序.

This gives no output and makes no files. I used the -v command as per some other answer I read on the site and it gave me this. I don't know how to proceed and execute my program.

推荐答案

我遇到了同样的问题,并且在使用传统的批处理控制台而不是Powershell运行它之后,我发现一个 dll 是丢失的.在Powershell命令行中不会弹出dll错误(上帝只知道原因).

I've had the same issue and, after running it with the traditional batch console instead of powershell, I noticed a dll was missing. The dll error won't pop up in the powershell command line (god only knows why).

在我的情况下,它是 libisl-15.dll ,但在您的PC上可能有所不同.

In my case it was libisl-15.dll, but it may be different on your PC.

希望这可以帮助世界上的某个人!

Hope this helps someone in the world!

这篇关于g ++不会产生任何文件或提供任何输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆