|
[Sponsors] |
April 26, 2021, 04:25 |
some confusion about "Make/options"
|
#1 |
New Member
warner chang
Join Date: Aug 2020
Posts: 21
Rep Power: 6 |
Hi! Foamers.
when I was compiling a new solver, I was confused about how to include proper files/libraries in the Make/options? some codes as follow: Code:
EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude EXE_LIBS = \ -lfiniteVolume \ -lfvOptions \ -lmeshTools And One more question! Are the libraries which are included in Make/options in /home/***/OpenFOAM/OpenFOAM-8/platforms/linux64GccDPInt32Opt/lib |
|
May 3, 2021, 18:58 |
|
#2 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40 |
The libraries listed as EXE_LIBS are all "proper" libraries, it just happens that the standard OpenFOAM library location is added automatically. That is to say, there is an implicit -L$(FOAM_LIBBIN) there. If you need to add libraries from other locations, eg -L$(FOAM_USER_LIBBIN) -lyourlib, or -L/cluster/path/lib64 -lsomeOther, you need to specify that.
|
|
May 4, 2021, 06:43 |
|
#3 |
New Member
warner chang
Join Date: Aug 2020
Posts: 21
Rep Power: 6 |
Hi! olesen
Thank you for your help! I am confused about the prefix -L, in my codes, it is started by -l, is there any difference between -L and -l? And what is the difference between EXE_INC and EXE_LIBS? I mean that they both contian "finiteVolume" and "meshTools". What EXE_LIBS contains is source files? and what EXE_INC contains is just dynamical links? Appreciate for your reply! |
|
May 7, 2021, 02:39 |
|
#4 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40 |
||
May 8, 2021, 18:58 |
|
#5 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 736
Rep Power: 14 |
You need to read up a little on compilation, as Mark suggests. In particular - learn about the role of include files (-I) during compilation, and the role of a linker in building an executable or library. Once you understand that, all will be clear!
|
|
May 9, 2021, 03:31 |
|
#6 |
New Member
warner chang
Join Date: Aug 2020
Posts: 21
Rep Power: 6 |
Thank you for reply!
Best regards! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Confusion choosing between static / transient simulations | TharunSK | CFX | 1 | March 15, 2019 18:53 |
some confusion about the radiation model of Floefd | jason kid | FloEFD, FloWorks & FloTHERM | 4 | March 3, 2016 08:13 |
[waves2Foam] have some confusion about the parameter Tsoft | zhxter | OpenFOAM Community Contributions | 1 | January 21, 2015 16:34 |
Sub-domain Confusion | Flaky | CFX | 6 | October 7, 2010 08:40 |
Avoiding Code Confusion | Jonas Larsson | CFX | 3 | April 18, 2001 04:44 |