我在Clion中有一个使用CMake和C ++ 14的项目。该项目可以编译,但是所有包含的标准库都标记为:
“找不到字符串”,“找不到stdexcept”等。
此外,没有检测到我包含的dll中的符号。因此它们都被标记为:
“无法解决...”
我已经包含了标题和cmakelist.txt。这仅在该项目中发生,并且我所有项目的cmakelist.txt文件都几乎相同。我尝试重新启动CLion的缓存。我还尝试将所有文件移到一个暂时可用的新项目中,但是一个小时后CLion再次标记了这些行。
cmakelists.txt
cmake_minimum_required(VERSION 3.6)
project(BCI)
set(CMAKE_CXX_STANDARD 14)
#create dlls and executables in the root directory
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR})
include_directories(
${CMAKE_SOURCE_DIR}
)
set(SOURCE_FILES
NeuralInterface.hpp
)
add_library(BCI SHARED ${SOURCE_FILES})
set_target_properties(BCI PROPERTIES LINKER_LANGUAGE CXX)
Run Code Online (Sandbox Code Playgroud)
神经接口
#ifndef NEURALINTERFACE_HPP
#define NEURALINTERFACE_HPP
//c++ includes
#include <stdexcept> //these are the includes which cannnot be resolved
#include <string>
//project includes
#include "okFrontPanelDLL.h"
extern std::string IntanAcquire; //this says cannot resolve container std
...
#endif
Run Code Online (Sandbox Code Playgroud)
我还能对CMake做些什么,以便它找到这些标头?
| 归档时间: |
|
| 查看次数: |
4284 次 |
| 最近记录: |