CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Problems in personal library compilation (http://www.cfd-online.com/Forums/openfoam/60699-problems-personal-library-compilation.html)

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:
/home/miriam/OpenFOAM/miriam-1.2/src/Chemotherapy/MatrixGeomFields/

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>
GeometricField<type,patchfiled,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:
MatrixGeomFields/

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:

Make/files:

$(HOME)/OpenFOAM/miriam-1.2/src/MatrixGeomFields/MatrixGeomFields.C
$(HOME)/OpenFOAM/miriam-1.2/src/MatrixGeomFields/MatrixGeomFieldsIO.C

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


Make/options:

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

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

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 .
libso
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.
miriam@cucciolo:~/OpenFOAM/miriam-1.2/src/Chemotherapy>


I cannot understand where the error is.

Thanks in advance
Bye

Miriam

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,
Rita

virginie_e February 23, 2009 10:00

Hello, I am also having a
 
Hello,

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

virginie_e February 23, 2009 11: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 ...

Virginie


All times are GMT -4. The time now is 08:27.