|
[Sponsors] |
February 27, 2007, 09:18 |
Hi
(wmake and makefile genera
|
#1 |
New Member
Antoine Dauptain
Join Date: Mar 2009
Location: Genova, Liguria, Italy
Posts: 7
Rep Power: 17 |
Hi
(wmake and makefile general stuff) I want to use a customized OpenFOAM solver (icoFoam with a volume force in it) in a coupler, PALM. I need to create a static library with the solver object (icoFoamCustom.o)and all the necessary libraries in it, in static version (libSomthg.a) The coupler cannot cope with dynamic linking, and uses only subroutines (i.e. "int main(" in the master file is now replaced by "int icoFoamCustom(" ) Any tip or comment would be gratefully acknowledged. Antoine |
|
March 5, 2007, 04:32 |
Ok i answered myself partly to
|
#2 |
New Member
Antoine Dauptain
Join Date: Mar 2009
Location: Genova, Liguria, Italy
Posts: 7
Rep Power: 17 |
Ok i answered myself partly to my problem, but i still need a hint:
I generated a static, fully independant library gathering the object of my own solver icofoam_customized.o and the objects included in the libraries libfFiniteVolume and LibOpenFOAM. My solver is now a function "int icofoamvfp()" without arguments. I can see it in my library under the name _Z10icofoamvfp with the unix command ">nm". The normal name icofoamvfp() is recoverable with the command "nm -C". My coupler cannot find back the object icofoamvfp() in my library. Anyone could help me to understand what is demangling (a link to website like "demangling for dummies" would be appreciated)? Cordially yours Ant. |
|
March 5, 2007, 04:42 |
Does your coupler expect exter
|
#3 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,685
Rep Power: 40 |
Does your coupler expect extern "C" linkage? If so, add it to the header.
|
|
March 5, 2007, 06:00 |
Indeed, the coupler's extern "
|
#4 |
New Member
Antoine Dauptain
Join Date: Mar 2009
Location: Genova, Liguria, Italy
Posts: 7
Rep Power: 17 |
Indeed, the coupler's extern "C" linkage is suspect. I am Working on it. Thanks for bringing it to my attention.
I ll write a complete walktrough as soon as it work. Ant. |
|
March 7, 2007, 11:17 |
I solved the question about de
|
#5 |
New Member
Antoine Dauptain
Join Date: Mar 2009
Location: Genova, Liguria, Italy
Posts: 7
Rep Power: 17 |
I solved the question about demangling by fully reinstalling the binutils, as (very well) explained in the Wiki OF compilation, since it appeard that a quick and dirty solution to the demangle.h compil pb of OpenFOAM.a was responsible.
My object is now clearly readable in my separated library. However, a tip about the "partial GNU binutils installation" on the Wiki. I skipped the declaration of the variable BINUTILS_ROOTS in the .cshrc or .bashrc, and written a the full path to the library in the /src/OpenFOAM/Make/options. This avoided the further "crtbegin.o not found" in all my c compilations. Hope this'll not lead to other pbs. Of course i found then an old pb already discussed on these pages about compiling the Pstream sources with the lammpi-7.1.2 , see "Recompilation errors, MPI related". This one seem not to have been solved. Ant. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to determine the type of an object in the object registry | mwild | OpenFOAM Running, Solving & CFD | 8 | June 8, 2010 20:58 |
[OpenFOAM] Multiple independant data sets in paraFoam | christian | ParaView | 1 | August 27, 2007 12:30 |
independant post-processor | JFS | Main CFD Forum | 8 | February 6, 2004 06:12 |
Can I insert an object before making grid in BFC? | ben | Phoenics | 0 | March 21, 2002 04:30 |
Discussion about Mesh independant solution | Seb | Main CFD Forum | 13 | May 22, 2001 13:37 |