foam-extend-4.0 移植重叠网格 wmake编译报错
-
由于特殊原因需要将fe41中的src/overset和求解器植入fe40。
目前已经完成src/overset目录下两个文件夹:oversetDynamicFvMesh和oversetMesh的编译,至少wmake libso没有报错。
然而,在编译pimpleDyMOversetFoam求解器时,报错:Making dependency list for source file pimpleDyMOversetFoam.C could not open file crMatrix.H for source file pimpleDyMOversetFoam.C SOURCE=pimpleDyMOversetFoam.C ; g++-5 -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-200 -I/home/gunther/foam/foam-extend-4.0/src/dynamicMesh/dynamicFvMesh/lnInclude -I/home/gunther/foam/foam-extend-4.0/src/dynamicMesh/dynamicMesh/lnInclude -I/home/gunther/foam/foam-extend-4.0/src/meshTools/lnInclude -I/home/gunther/foam/foam-extend-4.0/src/turbulenceModels/incompressible/turbulenceModel -I/home/gunther/foam/foam-extend-4.0/src/transportModels -I/home/gunther/foam/foam-extend-4.0/src/transportModels/incompressible/singlePhaseTransportModel -I/home/gunther/foam/foam-extend-4.0/src/finiteVolume/lnInclude -I/home/gunther/foam/gunther-4.0/src/overset/oversetMesh/lnInclude -I/home/gunther/foam/gunther-4.0/src/overset/oversetDynamicFvMesh/lnInclude -IlnInclude -I. -I/home/gunther/foam/foam-extend-4.0/src/foam/lnInclude -I/home/gunther/foam/foam-extend-4.0/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/pimpleDyMOversetFoam.o In file included from /home/gunther/foam/gunther-4.0/src/overset/oversetMesh/lnInclude/oversetFvPatch.H:39:0, from /home/gunther/foam/gunther-4.0/src/overset/oversetMesh/lnInclude/oversetFvPatchField.H:40, from /home/gunther/foam/gunther-4.0/src/overset/oversetMesh/lnInclude/oversetFvPatchFields.H:29, from pimpleDyMOversetFoam.C:43: /home/gunther/foam/gunther-4.0/src/overset/oversetMesh/lnInclude/oversetLduInterface.H:44:22: fatal error: crMatrix.H: No such file or directory compilation terminated. pimpleDyMOversetFoam.dep:796: recipe for target 'Make/linux64GccDPOpt/pimpleDyMOversetFoam.o' failed make: *** [Make/linux64GccDPOpt/pimpleDyMOversetFoam.o] Error 1
但是我在oversetLduInterface.H:中已经包含crMatrix.H,并且在Make/options中也包含了crMatrix.H的路径,并且在之前oversetDynamicFvMesh和oversetMesh的编译中没有报错。
oversetMesh/Make/options内容如下:EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/surfMesh/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/lduSolvers/lnInclude EXE_LIBS = \ -lfiniteVolume \ -lmeshTools \ -lsurfMesh \ -lsampling \ -llduSolvers
src/overset/oversetMesh/lnInclude/oversetLduInterface.H部分代码如下:
\*---------------------------------------------------------------------------*/ #ifndef oversetLduInterface_H #define oversetLduInterface_H #include "lduInterface.H" #include "primitiveFieldsFwd.H" #include "crMatrix.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
跪求大佬指点,救救孩子!
-
@Gunther 已经include?你是说在源代码里写的包含头文件那句代码?
你知道那个文件在哪,但是gcc不知道,所以得在options里写明,头文件的位置,和库文件的位置。
头文件可以让gcc知道有哪些函数可用,头文件一般都是函数声明。库文件定义函数如何运行。所以位置都得指明。
那些个IDE有的设定好了,把这些细节藏起来了。
至于为什么你的options文件没有发挥作用,我看你也没把overset的头文件写进包含里呀,具体怎么写不知道,但大概应该像这个的最后一行,地址不一定对,那你觉得你之前的option文件里,第几行包含了overset的头文件呢?
EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/surfMesh/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/lduSolvers/lnInclude \ -I$(LIB_SRC)/overset/lnInclude