【发布时间】:2020-11-05 12:54:26
【问题描述】:
嗨,我不明白为什么我不能使用 Visual Studio 代码从英特尔 IPP libaray 构建简单示例,它一直说致命错误:ipp.h:没有这样的文件或目录 2 | #包括“ipp.h”。我不明白为什么 VSCODE intellisense 可以看到所有 ipp 包含的内容。 我使用的是 Ubuntu 20.04 gcc/g++ 9 和 Visual Studio 代码 1.50.1。 如果我使用,我可以很好地编译和运行示例
g++ -g ipptest.cpp -I $IPPROOT/include -L$IPPROOT/lib/intel64 -o ipptest -lippi -lipps -lippcore
然后运行
./ipptest
从命令行 我的 task.json 文件看起来像这样
{
"version": "2.0.0",
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: g++ build active file",
"command": "/usr/bin/g++",
"args": [
"-g",
"${file}",
"-I ${IPPROOT}/include",
"-L ${IPPROOT}/lib/intel64",
"-o",
"${fileDirname}/${fileBasenameNoExtension}",
"-lippi -lipps -lippcore"
],
"options": {
"cwd": "/usr/bin"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "compiler: /usr/bin/g++"
}
]
}
和 c_cpp_properties.json
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${IPPROOT}/**",
"${workspaceFolder}/**"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "gnu17",
"cppStandard": "gnu++14",
"intelliSenseMode": "gcc-x64"
}
],
"version": 4
}
【问题讨论】:
标签: gcc visual-studio-code g++ vscode-tasks intel-ipp