|
[Sponsors] |
August 9, 2021, 20:09 |
Error compiling your own solver
|
#1 |
New Member
Elena Espana
Join Date: Aug 2021
Location: Texas
Posts: 19
Rep Power: 4 |
I have a solver that compiles in OpenFOAM v1812 but I am trying to compile it in OpenFOAM v8 and it does not work. I wrote it to create a mesh using STL files. Any suggestions. Below you can find the compilation error and I also attached the tool. Thank you All the best.
Making dependency list for source file findBed2dTo3d.C could not open file triSurface.H for source file findBed2dTo3d.C due to No such file or directory could not open file triSurfaceFields.H for source file findBed2dTo3d.C due to No such file or directory could not open file triSurfaceFieldsFwd.H for source file findBed2dTo3d.C due to No such file or directory could not open file labelledTri.H for source file findBed2dTo3d.C due to No such file or directory g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam8/src/finiteVolume/lnInclude -I/opt/openfoam8/src/meshTools/lnInclude -I/opt/openfoam8/src/surfMesh/lnInclude -I/opt/openfoam8/src/sampling/lnInclude -IlnInclude -I. -I/opt/openfoam8/src/OpenFOAM/lnInclude -I/opt/openfoam8/src/OSspecific/POSIX/lnInclude -fPIC -c findBed2dTo3d.C -o Make/linux64GccDPInt32Opt/findBed2dTo3d.o findBed2dTo3d.C:35:10: fatal error: triSurface.H: No such file or directory #include "triSurface.H" ^~~~~~~~~~~~~~ compilation terminated. /opt/openfoam8/wmake/rules/General/transform:25: recipe for target 'Make/linux64GccDPInt32Opt/findBed2dTo3d.o' failed make: *** [Make/linux64GccDPInt32Opt/findBed2dTo3d.o] Error 1 findBed2dTo3d_rosa.zip |
|
August 17, 2021, 02:00 |
|
#2 |
Senior Member
Tom-Robin Teschner
Join Date: Dec 2011
Location: Cranfield, UK
Posts: 205
Rep Power: 16 |
Well, the error just says that g++ doesn't know where these files are located (and you can tell g++ where they are through the -I flag in your options file. In the EXE_INC, you could try to add the relevant directory, i.e. place -I$(LIB_SRC)/triSurface/triSurfaceFields on your last line and escape the line before with \ so that you have:
Code:
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)/triSurface/triSurfaceFields There is also a better place to post such questions here on the forum, if the above doesn't solve your issue, you probably get a response quite quickly there. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Duplicate library entries when running a solver with custom library | francescomarra | OpenFOAM Programming & Development | 3 | May 17, 2022 08:37 |
thobois class engineTopoChangerMesh error | Peter_600 | OpenFOAM | 4 | August 2, 2014 09:52 |
Divergence problem | Smaras | FLUENT | 13 | February 21, 2013 05:03 |
3d vof | Smaras | FLUENT | 2 | February 19, 2013 06:58 |
why the solver reject it? Anyone with experience? | bearcat | CFX | 6 | April 28, 2008 14:08 |