简体   繁体   English

在Linux中运行C ++

[英]Running c++ in linux

I have saves my code in the name: clus.cpp when I open the terminal and run 打开终端并运行时,我已将代码保存为名称:clus.cpp

 g++ clusters.cpp

the output is: 输出为:

 fatal error: libspp.h: No such file or directory

It is the same for any other code, with different libraries. 对于具有不同库的任何其他代码,它都是相同的。 Does anyone know how can I solve the problem? 有谁知道我该如何解决这个问题?

This compiler error is practically telling you that there is no such file libspp.h on your computer. 该编译器错误实际上是在告诉您您的计算机上没有这样的文件libspp.h。

This means you have to install the library that contains this file. 这意味着您必须安装包含此文件的库。

If this is the same for every other code that you write just remove this header from your file. 如果您编写的所有其他代码都相同,则只需从文件中删除此标头即可。 The #include "libspp.h" and try with a simple program like printing "Hello world". #include "libspp.h"并尝试使用简单的程序,例如打印“ Hello world”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM