CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Problems in personal library compilation (

shrina July 11, 2006 09:09

Hi all, I've got problems i
Hi all,

I've got problems in compiling a personal library.

I would like to create a personal library called libChemotherapy to use in my solver.
At present it is just made up of a single class called MatrixGeomFields, whose files have been put in the folder:

The elements of that class are pointers to object of class GeometricField.
I created that class by modyfing the Matrix class:

the template class T is substituted by

template<class> class PatchField, class Geomesh>

I took off the arithmetic operators and Istream operator since they are not allowed for pointers.

I added To MatrixGeomfields.H file:

#include "GeometricField.H"
#include "GeometricFields.H"

since the elements of the matrix are pointers to objects of class GeometricField.

I have 4 files in the folder:

file:///home/miriam/OpenFOAM/miriam-1.2/src/Chemotherapy/MatrixGeomFields/Matrix GeomFields.C
file:///home/miriam/OpenFOAM/miriam-1.2/src/Chemotherapy/MatrixGeomFields/Matrix GeomFields.H
file:///home/miriam/OpenFOAM/miriam-1.2/src/Chemotherapy/MatrixGeomFields/Matrix GeomFields.H~
file:///home/miriam/OpenFOAM/miriam-1.2/src/Chemotherapy/MatrixGeomFields/Matrix GeomFieldsI.H
file:///home/miriam/OpenFOAM/miriam-1.2/src/Chemotherapy/MatrixGeomFields/Matrix GeomFieldsIO.C

In order to compile the library libChemotherapy which now contains only that class (MatrixGeomFields) I created the folder "Make" in the folder "Chemotherapy"
where I put the following files and options:



LIB = $(HOME)/OpenFOAM/miriam-1.2/lib/libChemotherapy


-I$(LIB_SRC)/OpenFOAM/lnInclude \ -I$(HOME)/OpenFOAM/miriam-1.2/src/Chemotherapy/MatrixGeomFields

-L$(HOME)/miriam/OpenFOAM/OpenFOAM-1.2/lib \

I opened the shell in "Chemotherapy" and I edited:

wmake libso

The result is the following one:

miriam@cucciolo:~/OpenFOAM/miriam-1.2/src/Chemotherapy> wclean
miriam@cucciolo:~/OpenFOAM/miriam-1.2/src/Chemotherapy> wmake libso
/home/miriam/OpenFOAM/OpenFOAM-1.2/wmake/wmakeLnInclude: linking include files t o /home/miriam/OpenFOAM/miriam-1.2/src/Chemotherapy/lnInclude

make: *** No rule to make target `/home/miriam/OpenFOAM/miriam-1.2/src/MatrixGeo mFields/MatrixGeomFields.dep', needed by `Make/linuxGcc4Opt/dependencies'. Stop .
Make/linuxGcc4Opt/includeDeps:1: /home/miriam/OpenFOAM/miriam-1.2/src/MatrixGeom Fields/MatrixGeomFields.dep: No such file or directory
Make/linuxGcc4Opt/includeDeps:2: /home/miriam/OpenFOAM/miriam-1.2/src/MatrixGeom Fields/MatrixGeomFieldsIO.dep: No such file or directory
make: *** No rule to make target `/home/miriam/OpenFOAM/miriam-1.2/src/MatrixGeo mFields/MatrixGeomFieldsIO.dep'. Stop.

I cannot understand where the error is.

Thanks in advance


mss September 11, 2007 06:41

Hej Miriam, I have the same
Hej Miriam,

I have the same problem. Did you solve it?

best regards,

virginie_e February 23, 2009 11:00

Hello, I am also having a

I am also having a problem while compiling my own dynamic library:
+ wmake libso freeSurfacePerso/
make: *** No rule to make target `makeFreeSurfaceDataPerso.dep', needed by `Make/linux64GccDPOpt/dependencies'. Stop.

I have seen several links on the forum where people had this problem and managed to solve it, but most of the time they do not say how they did.

Could someone give a hint on how to solve the problem? Just a precision: I have compiled OpenFOAM-1.5-dev from svn two weeks ago and I hav installed gmp and mpfr and set the corresponding links in $PATH and $LD_LIBRAR_PATH. (OpenFOAM compiled fine).

Thank you in advance.


virginie_e February 23, 2009 12:12

Sorry for the last message. I
Sorry for the last message. I have also found how to solve the problem. Th idea: I used the executable wmakeFilesAndOptions which added lines to the original files such as:
lnInclude = lnInclude
and changed the order of the compiled files.

hope this might help somebody perhaps ...


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