|
[Sponsors] |
Problems linking my libraries with libfoamUser |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 14, 2007, 19:21 |
Ok, I have already read the ma
|
#1 |
New Member
Jonatas
Join Date: Mar 2009
Posts: 4
Rep Power: 17 |
Ok, I have already read the manual... ;-)
I am using OpenFOAM 1.4 in Linux (gcc 4.2.0). I implemented my own finite volume surface interpolation schema and I created a lib called mylib (using the manual's instructions). When I try rebuild libfoamUser to include mylib, it compiles without errors. A file libmylib.so is created in the $FOAM_USER_LIBBIN directory. Then I rebuild the foamUser lib (again, using the manual's instructions). The problem is: the resulting $FOAM_USER_LIBBIN/libfoamUser.so file is exactly equal the original file that existed before (in $FOAM_LIBBIN). The diff command doesnt return any difference and the ldd command does not "sees" mylib in the resulting libfoamUser file. My mylib ./Make/files content: ------------------------------- SRC1.C SRC2.C LIB = $(FOAM_USER_LIBBIN)/libmylib My foamUser ./Make/files file content: ------------------------------------- libfoamUser.C LIB = $(FOAM_USER_LIBBIN)/libfoamUser My foamUser ./Make/options file content: --------------------------------------- LIB_LIBS = -L$(FOAM_USER_LIBBIN) (Im using -L$(FOAM_USER_LIBBIN) because if I use -lmylib, it doesn find the library) What am I doing wrong? It compiles without errors. (using wmake libso) BTW, Is there any method i can use to verify if a solver is really using my interpolation schema ? Thanks for your attention, Jonatas. |
|
October 22, 2007, 11:09 |
Problem solved:
My foamUser
|
#2 |
New Member
Jonatas
Join Date: Mar 2009
Posts: 4
Rep Power: 17 |
Problem solved:
My foamUser ./Make/options file content was wrong. It should be: LIB_LIBS = -L$(FOAM_USER_LIBBIN) -lmylib Thanks. |
|
October 21, 2008, 14:56 |
Hi,
I cannot find the foamU
|
#3 |
New Member
Tim Stovall
Join Date: Mar 2009
Posts: 12
Rep Power: 17 |
Hi,
I cannot find the foamUser directory anywhere. I checked where the user manual says: src/foamUser. I also checked on the OpenFoam website where it lists all the files, and it is not there. Please help. |
|
October 22, 2008, 11:25 |
I guess the directory may be c
|
#4 |
Senior Member
Hua Zen
Join Date: Mar 2009
Posts: 138
Rep Power: 17 |
I guess the directory may be changed.Try to get the new place by
echo $FOAM_USER_LIBBIN |
|
October 22, 2008, 14:40 |
I've tried searching with 'fin
|
#5 |
New Member
Tim Stovall
Join Date: Mar 2009
Posts: 12
Rep Power: 17 |
I've tried searching with 'find . -name foamUser' and the file is nowhere in my OpenFOAM directory.
Has there been a change for OpenFOAM 1.4.1 to remove the foamUser feature? If so, I can I link my libraries? |
|
October 22, 2008, 17:53 |
Hi Tim,
The foamUser featur
|
#6 |
Member
Mathieu Olivier
Join Date: Mar 2009
Location: Quebec City, Canada
Posts: 77
Rep Power: 17 |
Hi Tim,
The foamUser feature does not exist anymore (in 1.4.1 at least). See the release notes : " - foamUser and foamUtil libraries replaced by the more general dlopen method in which any libraries may be included at run-time using the optional 'libs' entry in the case controlDict, e.g. to replicate previous automatic inclusion of the foamUser and foamUtil libraries include libs ("libfoamUser.so" "libfoamUtil.so"); in controlDict. " You can also link the solver you would like to use with your new library by recompiling the solver with a link to your library (in the make/option file of the solver). For a good example, see how the tractionDisplacement boundary condition is integreted to the solver solidDisplacement (~/OpenFOAM/OpenFOAM-1.4.1/applications/solvers/stressAnalysis/solidDisplacement Foam) Good luck, Mathieu |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] Using native MPI libraries | arkangel | OpenFOAM Installation | 21 | December 16, 2016 00:23 |
Linking libraries with wmake | hemph | OpenFOAM | 5 | November 13, 2006 05:12 |
CGNS libraries, compiling and linking... | Ironman80 | Main CFD Forum | 2 | February 14, 2006 23:36 |
AMG libraries | CMB | Siemens | 2 | January 23, 2004 02:54 |
help on POOMA/PVM etc. libraries | mayank | Main CFD Forum | 0 | November 15, 2002 00:04 |