我已经在我的主文件夹中提取了 Extreme tux racer,将其提取到同一文件夹中后,我运行命令-
~/game/autorun.sh
~/game/./configure
Run Code Online (Sandbox Code Playgroud)
然后运行以下命令-
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no …Run Code Online (Sandbox Code Playgroud) 我正在使用 Ubuntu 14.04.1
我想知道,
我是否需要g++从 Ubuntu 软件中心安装才能编译 C++ 文件?是GCC(GNU编译器集合)能够代替做到这一点?
如果我的第一个问题的答案是,是的...
那么,为什么 Ubuntu 14.04 没有 C++ 编译器呢?毕竟它也同样重要GCC吗?为什么 c++ 编译器不附带默认的 Ubuntu 安装?
是否有任何可能的方法来获取终端中 MPI 命令的开发人员手册帮助。我尝试mpi --help过mpich --help(因为 mpi 版本命令看起来像mpich --version)但没有用。那么,获取 mpi 手动帮助的终端命令是什么?我期待类似的东西,要知道“MPI_Send”,它应该给出类似这样的东西:-
MPI_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,MPI_Comm comm)
Run Code Online (Sandbox Code Playgroud) 每次尝试执行程序时,无论是什么程序,都会收到以下消息:
bash: ./filename.cpp: Permission denied
Run Code Online (Sandbox Code Playgroud)
当我编译时我没有问题,它工作正常。但是当我想执行时,我收到了这条消息。
和权限有关系吗?因为我也有很多问题。我无法访问我的共享文件夹,除非我使用
sudo nautilus
Run Code Online (Sandbox Code Playgroud)
请看我的另一个问题。
我正在通过葡萄酒运行记事本++。但我无法编译程序(特别是 C++)。
有没有我可以使用的编译器?我该怎么办?
情况:很久以前,我通过转换为 *.SO 文件在 C 和 C++ 中开发了一些编码 - 我删除了那些 C 和 C++ 文件。
问题:我想将*.SO文件重新转换为C和C++文件以进行代码升级,请指导程序并发送任何重新转换的教程和程序。
我试图这样做:
$ g++
The program 'g++' is currently not installed. You can install it by typing:
sudo apt-get install g++
$ sudo apt-get install g++
[sudo] password for user:
Reading package lists... Done
Building dependency tree
Reading state information... Done
g++ is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
Run Code Online (Sandbox Code Playgroud) 我刚开始在 Ubuntu 上使用 C++,但我已经陷入困境。
我制作了我的第一个 .cc 程序并尝试用 g++ 编译它。
我将它命名为 variabili.cc 并将其保存在我桌面上一个名为 Esercizi 的文件夹中。
当我尝试
g++ variabili.cc
Run Code Online (Sandbox Code Playgroud)
我得到:
g++: error: variabili.cc No such file or directory
g++: fatal error: no input files compilation terminated
Run Code Online (Sandbox Code Playgroud)
我检查了该文件是否在那里ls ~/Desktop并且它在那里。名字也是对的。
无论我做什么,它似乎都不起作用。
我在 Windows 中使用 Visual Studio 两年了,但现在我使用 Ubuntu。是否有其他与 Visual Studio 一样高质量的 C#/C++ IDE 可供使用?请不要告诉我另一个 IDE 的名称,它告诉我在测试之前下载 5 GB 文件,然后我应该尝试使用 Wine 运行整个过程。我想在 Ubuntu 中将其用作 Linux 应用程序,而不是使用 Wine 在 Ubuntu 中安装 Windows 应用程序。
我正在使用 C++ 进行开发。我听说GTK要被Wayland取代了。
哪些 GUI 库适合长期使用 C++?
我正在使用 ubuntu 16.04 当我尝试使用以下命令编译程序时
g++ -g main.cpp -o main
Run Code Online (Sandbox Code Playgroud)
这是我的 g++ 版本
g++ --version
Run Code Online (Sandbox Code Playgroud)
g++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Run Code Online (Sandbox Code Playgroud)
我收到这个编译错误
main.cpp:8: undefined reference to `Helper::IsStringNumeric(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
collect2: error: ld returned 1 exit status
Run Code Online (Sandbox Code Playgroud)
主要.cpp:
#include "Helper.h"
#include <iostream>
#include <vector>
int main()
{
std::cout << Helper::IsStringNumeric("200");
} …Run Code Online (Sandbox Code Playgroud) 我想阐明 Linux 中的软件应用程序和库安装理念和最佳实践。根据我对文件系统层次结构标准(FHS)的理解,新软件必须安装在 /opt 中,这就是包管理器的作用。但是,包管理器是否也在 /use/local 目录中安装应用程序软件或仅在库软件中安装应用程序软件?例如,我安装了 Eigen c++ 库,它是一个基于头文件的库,使用:
sudo apt install libeigen3-dev
Run Code Online (Sandbox Code Playgroud)
我在 /usr/include 中找到了 Eigen 文件。但是,通过阅读 CMake 文档,当我开发 C++ 库时,我应该配置我的 CMake 将它们安装在 /usr/local 中(这是 CMAKE_INSTALL_PREFIX 的默认值)?这就提出了一个问题,为什么 Eigen 安装在 /usr/include 而不是 /usr/local/include 中?/usr/bit /usr/include 目录不是用于像命令 ls 和 cat 这样的系统应用程序吗?
此外,保存在 /usr/local 与 /usr/share 中的库有什么区别?
非常感谢您的帮助。我希望能够清楚地了解在 Linux 中安装应用程序和库软件的最佳实践。
我正在尝试学习 C++,但我什至无法使 cplusplus.org 中的第一个(hello world)示例与g++命令或c++. 我像示例一样创建了一个文件并运行g++ myfile,然后./myfile.
我遇到权限问题,然后我使用chmod +x myfile,权限问题消失了,但发生了这个问题:
gzuspower@gzuspower:~/Desktop$ ./4
./4: line 1: //myfirst: No such file or directory
./4: line 4: syntax error near unexpected token `('
./4: line 4: `int main ()'
Run Code Online (Sandbox Code Playgroud)
我打电话给我的文件,4因为这是我的第四次尝试。这是在Xubuntu 16.04上。重复的问题答案不起作用我试过.c,.cpp,作为文件扩展名并尝试了firstc++(我的第一次尝试文件)而不是4(我的第四次尝试文件),但没有任何效果。我将尝试不同形式的 hello-world 代码。