MPI编译C++程序出现#error "SEEK_SET is #defined but must not be for the C++ binding of MPI" 的解决方法
2010-11-09 13:18
1596 查看
MPI的mpicc和mpicxx命令编译C++程序时,可能会遇到如下三种错误信息:
#error "SEEK_SET is #defined but must not be for the C++ binding of MPI"
#error "SEEK_CUR is #defined but must not be for the C++ binding of MPI"
#error "SEEK_END is #defined but must not be for the C++ binding of MPI"
原因:
Is the result of a name conflict between stdio.h and the MPI C++ binding.
解决方法
Users should place the mpi include before the stdio.h and iostream includes.
简单的就,就是头文件包含的顺序问题,可能是把#include <iostream>放在了#include "mpi.h"的前面,才出现了如此莫名其妙的错误……
把#include "mpi.h"放在最前面就OK了。
参考:http://www.nics.tennessee.edu/node/295
#error "SEEK_SET is #defined but must not be for the C++ binding of MPI"
#error "SEEK_CUR is #defined but must not be for the C++ binding of MPI"
#error "SEEK_END is #defined but must not be for the C++ binding of MPI"
原因:
Is the result of a name conflict between stdio.h and the MPI C++ binding.
解决方法
Users should place the mpi include before the stdio.h and iostream includes.
简单的就,就是头文件包含的顺序问题,可能是把#include <iostream>放在了#include "mpi.h"的前面,才出现了如此莫名其妙的错误……
把#include "mpi.h"放在最前面就OK了。
参考:http://www.nics.tennessee.edu/node/295
相关文章推荐
- MPI编译C++程序出现#error "SEEK_SET is #defined but must not be for the C++ binding of MPI" 的解决方法
- 实用程序软件包(关于使用静态函数报错问题“Static function declared but not defined in C+++ "eh.h is only for C++!"报错问题)
- Eclipse 出现Some sites could not be found. See the error log for more detail.错误 解决方法
- The prefix "mvc" for element "mvc:annotation-driven" is not bound 的解决方法
- Eclipse 出现Some sites could not be found. See the error log for more detail.错误 解决方法
- springMVC- The prefix "mvc" for element "mvc:annotation-driven" is not bound 解决方法
- eclipse maven工程导入到MyEclipse出现"Versions of Spring facet could not be detected”的解决方法
- 出现"eh.h is only for C++!"错误的解决方法
- Eclipse 出现Some sites could not be found. See the error log for more detail.错误 解决方法
- Service部署到服务器后出现"The test form is only available for requests from the local machine"解决方法
- VS2005 出现 The OutputPath property is not set for this project. 错误的解决方法
- Eclipse 出现Some sites could not be found. See the error log for more detail.错误 解决方法
- 出现"cannot be resolved or is not a field"莫名错误的解决方法
- The prefix "mvc" for element "mvc:annotation-driven" is not bound 的解决方法
- Service部署到服务器后出现"The test form is only available for requests from the local machine"解决方法
- swift编码出现Call can throw, but it is not marked with 'try' and the error is not handled错误的解决
- android工程出现"The method * of type * must override a superclass method"的解决方法
- "Borland license information was found,but it is not valid for delphi." 的解决方法
- Actionscript Error: declaration must be contained within the <Declarations> tag, since it is not ass
- Linux 'XXXXXX' "is not in the sudoers file. This incident will be reported" 解决方法