CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   compile a library (http://www.cfd-online.com/Forums/openfoam/94026-compile-library.html)

aqua November 3, 2011 08:26

compile a library
 
I am trying to create a new library based on "movingConeTopoFvMesh". are there someone can help? I am using the OpenFoam2.0.1 version. when type in wmake libso, there is always the mistake :

wmakeLnInclude: linking include files to ./lnInclude
make: *** lnInclude/: Is a directory. Stop.

help me please...:(

marupio November 3, 2011 12:18

What do your Make/options and Make/files files look like?

aqua November 3, 2011 21:03

Hi,
 
What I did is try to follow the steps bellow (it's for version 1.7) on version 2.0.1, after those command, the “wmake libso” didn't work...:
1 cp −r $FOAM_SRC/ topoChangerFvMesh /movingConeTopoFvMesh \
2 $WM_PROJECT_USER_DIR/ slidingConesFvMesh
3 cd $WM_PROJECT_USER_DIR/ slidingConesFvMesh
4 sed s /movingConeTopoFvMesh / slidingConesTopo / \
5 <movingConeTopoFvMesh.C >slidingConesFvMesh.C
6 sed s /movingConeTopoFvMesh / slidingConesTopo / \
7 <movingConeTopoFvMesh.H >slidingConesFvMesh.H
The library was copied and the names were changed to slidingConesFvMesh.. Copied were
also the Make folder containg the files files and options.
1 cp −r $FOAM_SRC/ topoChangerFvMesh /Make/ \
2 $WM_PROJECT_USER_DIR/ slidingConesFvMesh /
The files were rewritten into the following lines in order to only compile the slidingConesFvMesh library.
1 slidingConesFvMesh.C
2
3 LIB = $ (FOAM_USER_LIBBIN) / libslidingConesFvMesh
In the options file a line for including the files from the original library was added.
1 −I$ (LIB_SRC) / topoChangerFvMesh / lnInclude \
The copied movingConeTopotFvMesh can now be adopted for the new functionality. To compile
the changes made in the library the command
1 cd $WM_PROJECT_USER_DIR/ slidingConesFvMesh
2 wmake l i b s o




beside, i wonder, where is the "slidingConesFvMesh.so" if this compilation succeed?
Thank you so much!


All times are GMT -4. The time now is 00:06.