CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

how to link the path of a newly compiled library to another library in OpenFOAM

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 8, 2021, 06:00
Default how to link the path of a newly compiled library to another library in OpenFOAM
  #1
New Member
 
Sourav Hossain
Join Date: Mar 2019
Posts: 25
Rep Power: 5
sourav8016 is on a distinguished road
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
sourav8016 is offline   Reply With Quote

Old   June 8, 2021, 19:22
Default
  #2
Senior Member
 
Adhiraj
Join Date: Sep 2010
Location: Maryland, United States
Posts: 185
Rep Power: 14
adhiraj is on a distinguished road
Maybe you did not point the compiler to the location of the new library?
You can try something like this:

Code:
LIB_LIBS = \
-L/home/souravhossain/OpenFOAM/souravhossain-8/platforms/linux64GccDPOpt/lib \
-ltwoPhaseMixture \
-lincompressibleTransportModels \
-linterfaceProperties \
-ltwoPhaseProperties \
-lfiniteVolume
or something similar.
adhiraj is offline   Reply With Quote

Old   June 9, 2021, 02:50
Default
  #3
New Member
 
Sourav Hossain
Join Date: Mar 2019
Posts: 25
Rep Power: 5
sourav8016 is on a distinguished road
Quote:
Originally Posted by adhiraj View Post
Maybe you did not point the compiler to the location of the new library?
You can try something like this:

Code:
LIB_LIBS = \
-L/home/souravhossain/OpenFOAM/souravhossain-8/platforms/linux64GccDPOpt/lib \
-ltwoPhaseMixture \
-lincompressibleTransportModels \
-linterfaceProperties \
-ltwoPhaseProperties \
-lfiniteVolume
or something similar.
Thank you Adhiraj. Yes, I did'n point the compiler to the location. Now here it is solved.

************************************************** ********************************
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

************************************************** ************************************************
sourav8016 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
New library for wall-modelled LES with OpenFOAM tiam OpenFOAM Announcements from Other Sources 10 May 19, 2021 05:30
OpenFOAM course for beginners Jibran OpenFOAM Announcements from Other Sources 2 November 4, 2019 09:51
UNIGE February 13th-17th - 2107. OpenFOAM advaced training days joegi.geo OpenFOAM Announcements from Other Sources 0 October 1, 2016 20:20
Cross-compiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingw-w64 wyldckat OpenFOAM Announcements from Other Sources 3 September 8, 2010 07:25
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 19:07


All times are GMT -4. The time now is 15:45.