CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   accessing multiple user-defined libraries from one .so file (http://www.cfd-online.com/Forums/openfoam-programming-development/85674-accessing-multiple-user-defined-libraries-one-so-file.html)

elbertj March 3, 2011 20:52

accessing multiple user-defined libraries from one .so file
 
I have created a few user-defined libraries into "libmy.so" and would like to use them one at a time in application simpleFoam. Hence I refer to only "libmy.so" in the controlDict. What I notice is that only the latest built library is accessible.

Can I store more than one user library in a single .so file?

Thanks,
Elbert

akidess March 4, 2011 05:09

To me it sounds like this: You have multiple folders with the Make/files specifying the same output file. Now naturally every time you run wmake libso, the linker will overwrite the last binary - it's what you told it to do. If you want to link all files into one library, you will have to write one Make/files for all of them, doing something like the following:

Code:

lib1/source1.C
lib1/source2.C
lib2/source2.C
[...]

LIB = $(FOAM_USER_LIBBIN)/mylib


elbertj March 4, 2011 13:37

Thanks Anton! I am now able to store multiple user-defined libraries in one .so file and use them.


All times are GMT -4. The time now is 15:25.