|
[Sponsors] |
November 22, 2021, 05:04 |
compile a library
|
#1 |
Member
Nguyen Trong Hiep
Join Date: Aug 2018
Posts: 48
Rep Power: 7 |
Hello everyone,
I am new to OpenFOAM, i wnat to implement new solver to OpenFOAM, my solver base on some library in openFOAM-v2106, so i copy this library to my OpenFOAM-dev folder but when i use wmake, openfoam cannot find this library Code:
/home/hieppc/foam/OpenFOAM-dev/src/thermophysicalModels/basic/lnInclude/basicThermo.H:65:10: fatal error: physicalProperties.H: No such file or directory 65 | #include "physicalProperties.H" | ^~~~~~~~~~~~~~~~~~~~~~ compilation terminated. But the output is only wmake libso . Code:
wmake libso . |
|
November 22, 2021, 05:13 |
|
#2 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,689
Rep Power: 40 |
Quote:
You don't need to copy the OpenFOAM sources anywhere, you need to appropriate include and link information available. This information is conveyed through the Make/options EXE_INC entry. It would be much, much too long to list everything that you will possibly need but the contents would at least have these lines: Code:
EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude LIB_LIBS = \ -lthermophysicalProperties \ -lspecie |
||
November 22, 2021, 05:25 |
|
#3 | |
Member
Nguyen Trong Hiep
Join Date: Aug 2018
Posts: 48
Rep Power: 7 |
Quote:
Code:
EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude EXE_LIBS = \ -lfiniteVolume \ -llduSolvers \ -lfvOptions \ -lmeshTools \ -lsampling \ -lcompressibleTransportModels \ -lfluidThermophysicalModels \ -lspecie \ -lturbulenceModels \ -lcompressibleTurbulenceModels \ -lthermophysicalProperties \ -latmosphericMode |
||
November 22, 2021, 08:39 |
|
#4 |
Member
Nguyen Trong Hiep
Join Date: Aug 2018
Posts: 48
Rep Power: 7 |
i have solved this problem by using wclean and rerun wmake libso again.
Now i have another question: I copy src/foam from foam extend to OpenFOAM-dev/src/foam and run wmake libso and terminal tell me it can not create file. I tried to super user and set permission to 777 but cannot resolve it. Code:
hieppc@ubuntu:~/foam/OpenFOAM-dev/src/foam$ wmake libso wmake libso . wmake error: file '/home/hieppc/foam/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/src/foam/files' could not be created in /home/hieppc/foam/OpenFOAM-dev/src/foam |
|
February 4, 2024, 13:04 |
|
#5 |
New Member
Anurag Ray
Join Date: May 2019
Posts: 2
Rep Power: 0 |
If possible show the Make/file file
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Compile the UDF by linking along with an external static library | Abhinand | Fluent UDF and Scheme Programming | 6 | June 15, 2020 13:23 |
Forcing a solver to use your custom library. | cdunn6754 | OpenFOAM Programming & Development | 0 | March 30, 2017 16:05 |
how to compile new thermodynamic library (basicPsiThermo) | megacrout | OpenFOAM | 1 | February 2, 2012 03:57 |
Can someone PLEASE document the development version installation | bernd | OpenFOAM Installation | 76 | November 14, 2008 21:51 |
Compile of the library is so slow | liu | OpenFOAM Running, Solving & CFD | 1 | July 15, 2005 02:49 |