我正在尝试用Google编译一些测试。我使用的是GTEST附带的示例makefile,但它来自不同的目录。我添加了一些make目标来编译我的测试和源代码,但保留了Google Test位元,但是编译Google测试源失败了:
g++ -isystem ~/stm32/googletest/googletest/include -I~/stm32/googletest/googletest -g -Wall -Wextra -pthread -c \
~/stm32/googletest/googletest/src/gtest-all.cc
/home/nuclear_kiwi/stm32/googletest/googletest/src/gtest-all.cc:42:24: Fatal Error: src/gtest.cc: File or directory not found
#include "src/gtest.cc"为什么这会失败,即使在调用编译器时提供了源路径?
发布于 2017-03-31 11:12:25
你需要改变:
-I~/stm32/googletest/googletest至:
-I ~/stm32/googletest/googletest当~发生在单词的开头时,Bash只会识别倾斜前缀操作符.3.4.3.倾斜展开
https://stackoverflow.com/questions/43125946
复制相似问题