- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个奇怪的错误,一段时间以来我都没有设法解决。我想通过与英特尔 OpenVINO 的推理引擎一起使用来扩展一个 C++ 软件包。因此,我必须动态链接一些库并将一些 header 包含到现有代码中。之前,它编译没有任何错误。然后我包含找到的第一个头文件 (#include "inference_engine.hpp"),但我收到此错误消息
In file included from /opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/VectorSpaceI.H:26:0,
from /opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/VectorSpace.H:230,
from /opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/Vector.H:44,
from /opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/vector.H:39,
from /opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/fieldTypes.H:35,
from /opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/primitiveFieldsFwd.H:36,
from tabulatedCombustionModel/FPVANNModel/FPVANNModel.H:44,
from tabulatedCombustionModel/FPVANNModel/FPVANNModel.C:31:
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:316:13: error: ‘FatalError’ in namespace ‘Foam’ does not name a type
::Foam::FatalError((functionName), __FILE__, __LINE__)
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:358:5: note: in expansion of macro ‘FatalErrorIn’
FatalErrorIn(functionName) \
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:367:24: note: in expansion of macro ‘notImplemented’
#define NotImplemented notImplemented(FUNCTION_NAME)
^
/opt/intel_openvino/openvino/inference_engine/include/ie_common.h:210:7: note: in expansion of macro ‘NotImplemented’
class NotImplemented : public std::logic_error
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/messageStream.H:225:27: error: expected unqualified-id before ‘__PRETTY_FUNCTION__’
#define FUNCTION_NAME __PRETTY_FUNCTION__
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:316:25: note: in definition of macro ‘FatalErrorIn’
::Foam::FatalError((functionName), __FILE__, __LINE__)
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:367:24: note: in expansion of macro ‘notImplemented’
#define NotImplemented notImplemented(FUNCTION_NAME)
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:367:39: note: in expansion of macro ‘FUNCTION_NAME’
#define NotImplemented notImplemented(FUNCTION_NAME)
^
/opt/intel_openvino/openvino/inference_engine/include/ie_common.h:210:7: note: in expansion of macro ‘NotImplemented’
class NotImplemented : public std::logic_error
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/messageStream.H:225:27: error: expected ‘)’ before ‘__PRETTY_FUNCTION__’
#define FUNCTION_NAME __PRETTY_FUNCTION__
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:316:25: note: in definition of macro ‘FatalErrorIn’
::Foam::FatalError((functionName), __FILE__, __LINE__)
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:367:24: note: in expansion of macro ‘notImplemented’
#define NotImplemented notImplemented(FUNCTION_NAME)
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:367:39: note: in expansion of macro ‘FUNCTION_NAME’
#define NotImplemented notImplemented(FUNCTION_NAME)
^
/opt/intel_openvino/openvino/inference_engine/include/ie_common.h:210:7: note: in expansion of macro ‘NotImplemented’
class NotImplemented : public std::logic_error
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/messageStream.H:225:27: error: expected ‘)’ before ‘__PRETTY_FUNCTION__’
#define FUNCTION_NAME __PRETTY_FUNCTION__
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:316:25: note: in definition of macro ‘FatalErrorIn’
::Foam::FatalError((functionName), __FILE__, __LINE__)
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:367:24: note: in expansion of macro ‘notImplemented’
#define NotImplemented notImplemented(FUNCTION_NAME)
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:367:39: note: in expansion of macro ‘FUNCTION_NAME’
#define NotImplemented notImplemented(FUNCTION_NAME)
^
/opt/intel_openvino/openvino/inference_engine/include/ie_common.h:210:7: note: in expansion of macro ‘NotImplemented’
class NotImplemented : public std::logic_error
^
In file included from /opt/intel_openvino/openvino/inference_engine/include/ie_blob.h:20:0,
from /opt/intel_openvino/openvino/inference_engine/include/inference_engine.hpp:16,
from tabulatedCombustionModel/FPVANNModel/FPVANNModel.H:68,
from tabulatedCombustionModel/FPVANNModel/FPVANNModel.C:31:
/opt/intel_openvino/openvino/inference_engine/include/ie_common.h:210:22: error: expected unqualified-id before ‘:’ token
class NotImplemented : public std::logic_error
^
In file included from /opt/intel_openvino/openvino/inference_engine/include/inference_engine.hpp:16:0,
from tabulatedCombustionModel/FPVANNModel/FPVANNModel.H:68,
from tabulatedCombustionModel/FPVANNModel/FPVANNModel.C:31:
/opt/intel_openvino/openvino/inference_engine/include/ie_blob.h: In static member function ‘static size_t InferenceEngine::Blob::product(const SizeVector&)’:
/opt/intel_openvino/openvino/inference_engine/include/ie_blob.h:245:75: warning: use of old-style cast [-Wold-style-cast]
return std::accumulate(std::begin(dims), std::end(dims), (size_t) 1, std::multiplies<size_t>());
^
In file included from /opt/intel_openvino/openvino/inference_engine/include/inference_engine.hpp:18:0,
from tabulatedCombustionModel/FPVANNModel/FPVANNModel.H:68,
from tabulatedCombustionModel/FPVANNModel/FPVANNModel.C:31:
/opt/intel_openvino/openvino/inference_engine/include/ie_error.hpp: At global scope:
/opt/intel_openvino/openvino/inference_engine/include/ie_error.hpp:16:7: warning: ‘class InferenceEngine::IErrorListener’ has virtual functions and accessible non-virtual destructor [-Wnon-virtual-dtor]
class IErrorListener {
^
In file included from /opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/VectorSpaceI.H:26:0,
from /opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/VectorSpace.H:230,
from /opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/Vector.H:44,
from /opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/vector.H:39,
from /opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/fieldTypes.H:35,
from /opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/primitiveFieldsFwd.H:36,
from tabulatedCombustionModel/FPVANNModel/FPVANNModel.H:44,
from tabulatedCombustionModel/FPVANNModel/FPVANNModel.C:31:
/opt/intel_openvino/openvino/inference_engine/include/details/ie_exception_conversion.hpp: In function ‘void InferenceEngine::details::extract_exception(InferenceEngine::StatusCode, char*)’:
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:359:47: error: ‘FatalError’ was not declared in this scope
<< "Not implemented" << ::Foam::abort(FatalError);
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:367:24: note: in expansion of macro ‘notImplemented’
#define NotImplemented notImplemented(FUNCTION_NAME)
^
/opt/intel_openvino/openvino/inference_engine/include/details/ie_exception_conversion.hpp:60:36: note: in expansion of macro ‘NotImplemented’
case NOT_IMPLEMENTED:throw NotImplemented(msg);
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:359:47: note: suggested alternative:
<< "Not implemented" << ::Foam::abort(FatalError);
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:367:24: note: in expansion of macro ‘notImplemented’
#define NotImplemented notImplemented(FUNCTION_NAME)
^
/opt/intel_openvino/openvino/inference_engine/include/details/ie_exception_conversion.hpp:60:36: note: in expansion of macro ‘NotImplemented’
case NOT_IMPLEMENTED:throw NotImplemented(msg);
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:303:16: note: ‘Foam::FatalError’
extern error FatalError;
^
In file included from /opt/intel_openvino/openvino/inference_engine/include/cpp/ie_plugin_cpp.hpp:16:0,
from /opt/intel_openvino/openvino/inference_engine/include/ie_plugin_dispatcher.hpp:14,
from /opt/intel_openvino/openvino/inference_engine/include/inference_engine.hpp:21,
from tabulatedCombustionModel/FPVANNModel/FPVANNModel.H:68,
from tabulatedCombustionModel/FPVANNModel/FPVANNModel.C:31:
/opt/intel_openvino/openvino/inference_engine/include/details/ie_exception_conversion.hpp:60:55: warning: statement has no effect [-Wunused-value]
case NOT_IMPLEMENTED:throw NotImplemented(msg);
^
In file included from /opt/intel_openvino/openvino/inference_engine/include/inference_engine.hpp:21:0,
from tabulatedCombustionModel/FPVANNModel/FPVANNModel.H:68,
from tabulatedCombustionModel/FPVANNModel/FPVANNModel.C:31:
/opt/intel_openvino/openvino/inference_engine/include/ie_plugin_dispatcher.hpp: At global scope:
/opt/intel_openvino/openvino/inference_engine/include/ie_plugin_dispatcher.hpp:20:7: warning: ‘class InferenceEngine::PluginDispatcher’ has virtual functions and accessible non-virtual destructor [-Wnon-virtual-dtor]
class PluginDispatcher {
^
In file included from tabulatedCombustionModel/FPVANNModel/FPVANNModel.H:68:0,
from tabulatedCombustionModel/FPVANNModel/FPVANNModel.C:31:
/opt/intel_openvino/openvino/inference_engine/include/inference_engine.hpp: In function ‘void InferenceEngine::TopResults(unsigned int, InferenceEngine::TBlob<T>&, std::vector<unsigned int>&)’:
/opt/intel_openvino/openvino/inference_engine/include/inference_engine.hpp:45:57: warning: use of old-style cast [-Wold-style-cast]
n = static_cast<unsigned>(std::min<size_t>((size_t) n, input.size()));
^
tabulatedCombustionModel/FPVANNModel/FPVANNModel.C: In member function ‘virtual void Foam::combustionModels::FPVANNModel::correctTabulatedANNTransport()’:
tabulatedCombustionModel/FPVANNModel/FPVANNModel.C:371:17: warning: unused variable ‘celli_count’ [-Wunused-variable]
int celli_count = 0;
^
tabulatedCombustionModel/FPVANNModel/FPVANNModel.C:404:17: warning: unused variable ‘patch_count’ [-Wunused-variable]
int patch_count = 0;
^
tabulatedCombustionModel/FPVANNModel/FPVANNModel.C:301:16: warning: unused variable ‘Zeta’ [-Wunused-variable]
double Zeta;
^
tabulatedCombustionModel/FPVANNModel/FPVANNModel.C: In member function ‘virtual void Foam::combustionModels::FPVANNModel::correctCalculatedANNTransport()’:
tabulatedCombustionModel/FPVANNModel/FPVANNModel.C:605:26: warning: unused variable ‘success’ [-Wunused-variable]
bool success = inf->doInference(frozenGraphName,inputOperationName,outputOperationName,no_of_inputs,no_of_outputs,input_dimensions,output_dimensions,cellsAndPatches,input_f_zeta_PVNorm,output_real,limit_intra,limit_inter,xlaJit);
^
tabulatedCombustionModel/FPVANNModel/FPVANNModel.C:696:17: warning: unused variable ‘celli_count’ [-Wunused-variable]
int celli_count = 0;
^
tabulatedCombustionModel/FPVANNModel/FPVANNModel.C:721:17: warning: unused variable ‘patch_count’ [-Wunused-variable]
int patch_count = 0;
^
In file included from tabulatedCombustionModel/FPVANNModel/FPVANNModel.H:66:0,
from tabulatedCombustionModel/FPVANNModel/FPVANNModel.C:31:
/home/elias/OpenFOAM/elias-4.1/LRT10Foam/src/../ThirdParty/ANNInference/TensorflowCAPI/inferenceC.H: At global scope:
/home/elias/OpenFOAM/elias-4.1/LRT10Foam/src/../ThirdParty/ANNInference/TensorflowCAPI/inferenceC.H:25:19: warning: ‘TF_Buffer* ReadBufferFromFile(const char*)’ defined but not used [-Wunused-function]
static TF_Buffer* ReadBufferFromFile(const char* file)
^
/home/elias/OpenFOAM/elias-4.1/LRT10Foam/src/../ThirdParty/ANNInference/TensorflowCAPI/inferenceC.H:55:13: warning: ‘void DeallocateTensor(void*, std::size_t, void*)’ defined but not used [-Wunused-function]
static void DeallocateTensor(void* data, std::size_t, void*) // vorher void* arg
^
make: *** [Make/linux64GccDPInt64Opt/tabulatedCombustionModel/FPVANNModel/FPVANNModel.o] Error 1
除了包含额外的标题外,我没有做任何更改,而且错误消息非常奇怪。一位同事提到,所涉及的两个程序(OpenFOAM 和 OpenVINO)之间可能存在一些“冲突”。有人可以提示我可能是什么问题吗?
谢谢!
编辑:也许我应该指出这两个部分:
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:316:13: error: ‘FatalError’ in namespace ‘Foam’ does not name a type
::Foam::FatalError((functionName), __FILE__, __LINE__)
/opt/intel_openvino/openvino/inference_engine/include/details/ie_exception_conversion.hpp: In function ‘void InferenceEngine::details::extract_exception(InferenceEngine::StatusCode, char*)’:
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:359:47: error: ‘FatalError’ was not declared in this scope
<< "Not implemented" << ::Foam::abort(FatalError);
最佳答案
原因隐藏在错误转储的一半附近:
#define NotImplemented notImplemented(FUNCTION_NAME)
OpenFOAM 将其用作宏以在未实现的方法中引发错误,而 OpenVINO 恰好定义了一个具有相同名称的类。 C++ 命名空间仅在宏扩展后解析,因此这对您没有帮助。
您的选项,按偏好大致排序:
#undef NotImplemented
。#undef NotImplemented
,然后包含 OpenVINO header 。这意味着您不能将 OpenFOAM 宏用于您自己的目的(尽管您可能不需要)。关于c++ - 是什么导致我的 "‘FatalError’ in namespace ‘Foam’ does not name a type”错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57005993/
大家好:我正在尝试创建一个命名空间,以便我可以在整个应用程序中的不同 CoffeeScript 文件中使用一个类(至少这是我对命名空间用途的理解) 我在这里找到了一个很好的例子:Classes wit
我想使用两个字符串(我不知道它们的内容)来创建两个 namespace 。如果 namespace 存在,我不想创建一个新的 namespace 。这是我的代码: function createNam
在 Struts 2 中,我看到根命名空间提供与根命名空间相同的行为,即充当“包罗万象”。我需要限制我的应用程序中的操作只能从一个 URL 访问,包括 URL 中没有 namespace 的操作。我的
我想在旧的代码库中包含新的 SASS。考虑到已经编写的新样式,我如何避免新样式泄漏。 例如 .box width: 100% // ... .tab display: inline-blo
我的\命名空间 \My\Namespace 那么,我应该使用哪一个,我看到了 php documentation主要使用 My\Namespace。 但据说 \My\Namespace 更好,因为没有
我正在研究 Rails 2.3.8。我的 environment.rb 中有以下内容 config.gem "redis" config.gem "redis-namespace", :lib =>
我有一个包含一些类型定义的小命名空间,我用它来使我的代码看起来更简洁。但是,我不想在每个使用这些类型之一的文件中添加“using namespace ...”行,毕竟我已经必须为文件添加 #inclu
如何获取 MediaWiki namespace 列表?最好有姓名和号码。 最佳答案 使用API:api.php?action=query&meta=siteinfo&siprop=namespa
为了使用“namespace import *”命令在不同的命名空间中使用该命名空间的变量/过程,“命名空间导出...”是否是必需的。我们真的应该在源命名空间中进行“导出”并在目标命名空间中进行“导入
假设我有以下 list ,例如部署,服务和入口。在默认 namespace 中,一切正常。虽然我想将资源投入到用manifest.yaml创建的另一个命名空间。我以为如果我写了 kubectl app
我想以编程方式将一个类从一个命名空间移动到另一个命名空间。这包括调整移动类在其先前命名空间中的任何依赖项。 我猜我可以以某种方式利用 Roslyn 项目,但我找不到起点。 编辑: 我正在尝试在 C#
Spring不同类型的注入方式 spring官网代码示例 1、不同类型的注入方式 <?xml version="1.0" encoding="UTF-8&qu
我想知道,考虑到这段代码: namespace A\B; use A\B as AB; use \Z\V as ZV; // another used namespace class Merry {
我正在研究一个似乎一切都很好的“董事会”类(class)。不知何故,在其他类(class)上工作了大约一个小时后,Board 在错误方面表现出一些非常奇怪的行为。 //headerfile #prag
我尝试在 TYPO3 扩展中创建多个 ViewHelper。 但是现在我尝试将 ViewHelper 放在子目录中,例如 扩展\类\ View 助手\自定义。 ViewHelper 的新
我的情况是:日历属于客户或销售员 因为我还有像 Event 和 File 这样的类,所以我将命名空间 App\Models 用于我所有的模型类。 所以我设置了多态关系: 在日历.php public
所有 Less 文档和教程都使用 #namespace > .mixin()当它进入命名空间时的语法。但是我发现自己更习惯于 .namespace.mixin()语法,即: .namespace()
我正在尝试使用 MS Robotics Studio 和 VS 2008 构建 DSS 服务,但是在构建时,我收到来自 dssproxy.exe 的错误消息: The class MyServ
例如,我们有两个用于解析简历的类,一个用于解析Excel,另一个用于解析HTML。我的同事们喜欢做的就是将这两个类命名为相同的名称,并将它们放在不同的命名空间中,如下所示: namespace XX.
我的库的所有类都在一个命名空间中定义。当我为 Doxygen 创建主页时,我必须在注释中明确使用这个命名空间来让 Doxygen 生成链接。我想对整个注释块使用“使用命名空间”之类的东西。 一个例子:
我是一名优秀的程序员,十分优秀!