how to link the path of a newly compiled library to another library in OpenFOAM
Hi Foamers,
I have modified incompressibleTwoPhaseMixture library to myIncompressibleTwoPhaseMixture library according to my need and compiled it. It compiles without any error. Now I was going to modify immiscibleIncompressibleTwoPhaseMixture library to myImmiscibleIncompressibleTwoPhaseMixture library. I want to link the path of myIncompressibleTwoPhaseMixture library in myImmiscibleIncompressibleTwoPhaseMixture library. I have tried to add the path in the options of myImmiscibleIncompressibleTwoPhaseMixture as EXE_INC = \ -I$(LIB_SRC)/transportModels/lnInclude \ -I/home/souravhossain/OpenFOAM/souravhossain-8/src/twoPhaseModels/myIncompressibleTwoPhaseMixture/lnInclude \ -I$(LIB_SRC)/twoPhaseModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/twoPhaseModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude LIB_LIBS = \ -ltwoPhaseMixture \ -lincompressibleTransportModels \ -linterfaceProperties \ -ltwoPhaseProperties \ -lfiniteVolume But it did'n work, while compilation of myImmiscibleIncompressibleTwoPhaseMixture library it's not able to detect the path of myIncompressibleTwoPhaseMixture library. Something wrong I am doing, but I was not able to figure it out. Please help me how to fix this. Note: I am using OpenFOam8 In Ubuntu 20.04 |
Maybe you did not point the compiler to the location of the new library?
You can try something like this: Code:
LIB_LIBS = \ |
Quote:
************************************************** ******************************** EXE_INC = \ -I$(WM_PROJECT_USER_DIR)/src/twoPhaseModels/myIncompressibleTwoPhaseMixture/lnInclude \ -I$(LIB_SRC)/transportModels/lnInclude \ -I$(LIB_SRC)/twoPhaseModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/twoPhaseModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude LIB_LIBS = \ -L$(FOAM_USER_LIBBIN) \ -lmyIncompressibleTwoPhaseMixture \ -ltwoPhaseMixture \ -lincompressibleTransportModels \ -linterfaceProperties \ -ltwoPhaseProperties \ -lfiniteVolume ************************************************** ************************************************ |
Hi Foamers
I now it is an old thread, but I have a similar problem. I want to compile a set of libraries for interfoam. I have modified the new version of twoPhaseMixture and compiled it as myTwoPhaseMixture library. Now I am trying to compile a modified a version of incompressibleTwoPhaseMixture, but I face an error like below. The context of my options file is as : EXE_INC = \ -I/home/siavash/OpenFOAM/siavash-9/solvers/Libraries/myTwoPhaseMixture/lnInclude \ -I$(LIB_SRC)/transportModels/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude LIB_LIBS = \ -L/home/siavash/OpenFOAM/siavash-9/platforms/linux64GccDPInt32Opt/lib \ -lmyTwoPhaseMixture \ -lfiniteVolume but the error is : wmake libso . wmakeLnIncludeAll: running wmakeLnInclude on dependent libraries: unknown option: '-I/home/siavash/OpenFOAM/siavash-9/solvers/Libraries/myTwoPhaseMixture/lnInclude' Usage: wmakeLnInclude [OPTION] [dir] options: -update | -u update -silent | -s use 'silent' mode (do not echo command) -help | -h print the usage Link all the source files in the <dir> into <dir>/lnInclude Note The '-u' option forces an update when the lnInclude directory already exists and changes the default linking from 'ln -s' to 'ln -sf'. wmakeLnInclude error: base directory \ does not exist Make/options:3: *** missing separator. Stop. wmake error: file 'Make/linux64GccDPInt32Opt/files' could not be created in /home/siavash/OpenFOAM/siavash-9/solvers/Libraries/myIncompressibleTwoPhaseMixture Thanks for your help and consideration. |
All times are GMT -4. The time now is 09:45. |