【发布时间】:2019-11-23 17:44:49
【问题描述】:
我已按照Linking against GTest fails 中描述的步骤进行操作,但出现此错误。
CMake Error in src/impl/data_structures/simple_tree/CMakeLists.txt:
Imported target "GTest::GTest" includes non-existent path
"~/local/include/"
更多信息包括:
in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:
* The path was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and references files it does not
provide.
编辑:虽然它失去了“一般性”,但我将 ~/ 路径替换为
完整路径,然后得到这个错误:
/usr/bin/ld: cannot find /home/myself/local/lib/: File format not recognized
路径确实存在。
【问题讨论】:
-
路径是否存在?尝试删除
~,然后写出完整路径。 -
在 Stack Overflow 上,我们希望所有重要信息都包含在问题帖子本身中。您的代码肯定是导致此类问题的原因,因此请将其添加到问题帖子中。链接到另一个问题可能很有用,但它并不能取代问题帖子中的代码需求。
标签: cmake googletest