c++ - 编程错误,C++ 新手

标签 c++ syntax-error

我正在学习 C++ 入门类(class),我们正在使用 jgrasp。我现在正在做一个简单的练习,看起来像这样:

#include <iostream>
using namespace std;

int main()
{
    cout << "Testing 1, 2, 3\n";
    return 0;
}

虽然当我编译它并链接它时我得到这个错误:

----jGRASP exec: g++ -c -fsyntax-only H:\COP2334\Excerises\Display 1.10

g++.exe: warning: H:\COP2334\Excerises\Display 1.10: linker input file unused because linking not done

----jGRASP: operation complete.

最佳答案

选项-c 表示“编译或汇编源文件,但不链接。”

因此,当然不会执行链接。

关于c++ - 编程错误,C++ 新手,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32418268/

相关文章:

c++ - Diamond Inheritance 中的虚表到底是为哪个类创建的?

c++ - 在 QtCreator 中跳过第二个自动生成的报价

linux - 使用 awk 在 bash 函数中使用命令输出变量时出错

mapping - 方案:映射 let 和 set!上 list

javascript - 未捕获的语法错误 : Unexpected token } debugging in Chrome

php - PHP语法错误由引号引起

c++ - 为什么不能捕获我的 C++ lambda 函数?

c++ - thread_specific_ptr 多线程混淆

c++ - 尝试在 Visual Studio 2010 中编译 Tessnet2 (Visual Studio 2008 C++) 项目

ios - Info.plist : The data couldn’t be read because it isn’t in the correct format