【发布时间】:2015-11-26 13:18:31
【问题描述】:
首先,像我 5 岁一样随意回答 :)
我编写了一个 Hello World c++ 程序,旨在包含我之前安装的密码库 fhe.h(使检查工作正常)。我有一个文件夹,我们称它为“dir”,包括“HelloWorld.cpp”和一个名为 HElib 的子文件夹,该文件夹在 HElib/src/fhe.h 目录下有“fhe.h”文件。
我的问题有点愚蠢,但是我该如何编译这个 c++ 文件呢?
我尝试 cd 到 /dir,然后是“g++ HelloWorld.cpp”,但没有找到 fhe.h。我也试过“g++ HelloWorld.cpp HElib/src/fhe.h”,还是找不到fhe.h。
如何告诉编译器这个文件的确切位置?我不想将我的 HelloWorld.cpp 文件放入 HElib,也不想将 fhe.h 从 HElib...
T-B
【问题讨论】:
-
HElib 包含一个应该回答这个问题的 install.txt:github.com/shaih/HElib/blob/master/INSTALL.txt
标签: c++ compilation include header-files include-path