编译C ++程序时出错 [英] Error compiling C++ program

查看:110
本文介绍了编译C ++程序时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试(第一次)编译C ++程序并在编译时收到以下错误:

I am trying (for the first time) to compile a C++ program and receive the following error when compiling:

C:\Users\Rich\Downloads\Aliqueit\Update>cl /EHsc aliqueit.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24210 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

aliqueit.cpp
c:\users\rich\downloads\aliqueit\update\aliqueit.h(11): fatal error C1083: Cannot
open include file: 'gmpxx.h': No such file or directory

文件aliqueit.h和gmpxx.h都与aliqueit.cpp文件位于同一目录中我正在尝试编译。

The files aliqueit.h and gmpxx.h are both in the same directory as the aliqueit.cpp file that I am trying to compile.

最后一个代码行是发生错误的地方:

The last code line is where the error occurs:

#include <vector>
#include <map>
#include <fstream>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <stdlib.h>
#include <ctype.h>
#include <math.h>
#include "cfg.h"
#include "misc.h"
#include "aliqueit.h"


感谢您的帮助。

Thanks for any help.

推荐答案

您不显示包含gmpxx.h的行。有两种可能性;名称不同或include语句使用<>而不是""。"

You don't show the line that includes gmpxx.h. There are two possibilities; either the name is different or the include statement uses <> instead of "".

在VS中,如果右键单击包含名称,则可以打开该文件; VS会告诉你它是否找不到它。这是检查是否可以找到它的快速方法。

In VS if you right-click on the include name then you can open the file; VS will tell you if it cannot find it. That is a quick way to check if it can be found.


这篇关于编译C ++程序时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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