我很难尝试安装 Google C++ Mocking Framework。我已成功运行sudo apt-get install google-mock
. 然后我尝试编译这个示例文件
#include "gmock/gmock.h"
int main(int argc, char** argv) {
::testing::InitGoogleMock(&argc, argv);
return RUN_ALL_TESTS();
}
Run Code Online (Sandbox Code Playgroud)
与g++ -lgmock main.cpp
这些错误显示
main.cpp:(.text+0x1e): undefined reference to `testing::InitGoogleMock(int*, char**)'
main.cpp:(.text+0x23): undefined reference to `testing::UnitTest::GetInstance()'
main.cpp:(.text+0x2b): undefined reference to `testing::UnitTest::Run()'
collect2: error: ld returned 1 exit status
Run Code Online (Sandbox Code Playgroud)
我猜链接器找不到库文件。有谁知道如何解决这个问题?
如何在 F2FS 分区上安装 Ubuntu 14.04?我使用 Gparted 创建了分区,但在安装过程中,Ubuntu 安装程序无法识别分区上的文件系统。我听说可以使用替代 DVD 进行安装,但他们说它仅适用于 Lubuntu。
我添加了 PPA 以在 Ubuntu 20.04 上安装 WoeUSB。
sudo add-apt-repository ppa:nilarimogard/webupd8
然后我尝试安装 WoeUSB。
martin@slazer:~/Downloads$ sudo apt install woeusb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have …
Run Code Online (Sandbox Code Playgroud) 我已经解决了。有必要从“development”文件夹中安装最新的二进制文件,解压缩名为“biber”的唯一文件并将其复制到“/usr/bin”。
最新的稳定版本1.0的二进制文件将无法工作并显示此错误。
slazer@peter:~/Downloads$ tar xvf "biber-linux_x86_64(2).tar.gz"
biber
slazer@peter:~/Downloads$ ./biber
data source /tmp/par-736c617a6572/cache-fb3144567cd1381b403b18600c1ec4b232b2c018/inc/lib/Biber/LaTeX/recode_data.xml not found in .
Compilation failed in require at Biber/Utils.pm line 20.
BEGIN failed--compilation aborted at Biber/Utils.pm line 20.
Compilation failed in require at Biber/Internals.pm line 8.
BEGIN failed--compilation aborted at Biber/Internals.pm line 8.
Compilation failed in require at (eval 22) line 2.
...propagated at /usr/local/perl/lib/5.14.1/base.pm line 94.
BEGIN failed--compilation aborted at Biber.pm line 5.
Compilation failed in require at script/biber line 20.
BEGIN …
Run Code Online (Sandbox Code Playgroud) 14.04 ×1
20.04 ×1
apt ×1
c++ ×1
dependencies ×1
f2fs ×1
filesystem ×1
gparted ×1
installation ×1
latex ×1
programming ×1
testing ×1
woeusb ×1