|
[Sponsors] |
January 31, 2017, 06:29 |
make/files
|
#1 |
New Member
Saeed
Join Date: Sep 2016
Posts: 16
Rep Power: 9 |
I was wondering about the make/files file. sometimes it has the address of the .C file to be compiled and where to compile it, so far rational:
SLGThermo/SLGThermo.C LIB = $(FOAM_LIBBIN)/libSLGThermo but sometimes there are lots of other .C addresses there (for example the src/lagrangian/intermediate/make/files) with only one address to compile to. does it mean that all of those files are compiled in one file?? |
|
January 31, 2017, 07:04 |
|
#2 |
Senior Member
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 20 |
A library is a collection of objects that may be included into a different code. For example, it is like loading a standard C-library to gain access to the vector class.
A dynamic library (.so) is a library that may be loaded at run-time. An object (.o) is a compiled source file. If you'd like to call it "all those files are compiled into one file", then sure, yes it is. In the same way, an executable will (virtually) always be created using multiple source files, although it ends up being a single "file". |
|
January 31, 2017, 07:25 |
|
#3 |
New Member
Saeed
Join Date: Sep 2016
Posts: 16
Rep Power: 9 |
Thank you Kevin,
hmm I haven't heard about .o files, but im thinking about what you said...correct me if im wrong please: the libraries and header files needed for compilation of those .C files are added in make/options. Also instead of creating a "make" folder for each of those .C files, they added all the .C names in one make/files (they might be connected to each other or not) and all the requirements for their compilation in make/options. |
|
January 31, 2017, 08:15 |
|
#4 | |
Senior Member
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 20 |
They appear in "Make/linux64GccDPInt32Opt" or similar (depending on your OS). You never see them (unless you are developing your own stand-alone code), because you don't need them. They are handled automatically by OpenFoam.
Quote:
Some additional details: make/options contain the locations (-I (capital i)) of all #included files, the locations (-L) of the required libraries and the names (-l (small L)) of the required libraries. Some things are automatically added by OpenFoam without the user noticing, like the directory $FOAM_LIBBIN. |
||
January 31, 2017, 10:20 |
|
#5 |
New Member
Saeed
Join Date: Sep 2016
Posts: 16
Rep Power: 9 |
Thank you Kevin,
that removed my ambiguities |
|
December 23, 2021, 21:21 |
|
#6 | |
New Member
Chen Di
Join Date: Apr 2014
Posts: 10
Rep Power: 12 |
Quote:
I am compiling several sources for one solver, one source is for solving the G.E.s, the others are giving the B.C.s. I failed in compiling when I tried to share some information among the sources. For details, in adjointOutletVelocityFvPatchVectorField.C, I can not even read any parameters in “transportProperties” if I do not set up IOdictionary, mesh, Time and so on. I am a beginner of C++, do you have any idea how can I do in OpenFOAM to share the information when I compile multiple sources? |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Compiling OpenFOAM14_patch on Solaris 10 | jfb | OpenFOAM Installation | 9 | April 16, 2010 08:58 |
Permeable wall BC | billy | OpenFOAM Pre-Processing | 7 | August 27, 2009 02:05 |
Hooking new BC is not successful | sponiar | OpenFOAM Running, Solving & CFD | 5 | March 7, 2008 08:05 |
How to add an application to FoamX | liqiangnwpu | OpenFOAM Running, Solving & CFD | 17 | May 25, 2005 02:18 |