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/)
-   -   Library Linking Problems (http://www.cfd-online.com/Forums/openfoam-programming-development/106219-library-linking-problems.html)

matari August 22, 2012 06:31

Library Linking Problems
 
Hi,

I created some libraries to calculate the reaction rate in OpenFOAM-2.1.x. Everything worked fine. Now I have to use OpenFOAM-2.0.x. I copied the files with my created libraries in my $WM_PROJECT_USER_DIR an compiled with
- wclean
- wmake libso

No error messages occur. I added the library in my controlDict file and ran the case with rhoReactingFoam. I get the following output:


Create time

--> FOAM Warning :
From function dlOpen(const fileName&, const bool)
in file POSIX.C at line 1142
dlopen error : /home/fluent/OpenFOAM/fluent-2.0.x/platforms/linux64Gcc45DPOpt/lib/libPropaneMainReactionRate.so: undefined symbol: _ZN4Foam6specie5debugE
--> FOAM Warning :
From function dlLibraryTable::open(const fileName&, const bool)
in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 96
could not load "libPropaneMainReactionRate.so"
Create mesh for time = 0

Reading chemistry properties


Reading g

Reading thermophysicalProperties
Selecting rhoChemistryModel ODEChemistryModel<gasThermoPhysics>
Selecting thermodynamics package hsRhoMixtureThermo<reactingMixture<gasThermoPhysic s>>
Selecting chemistryReader foamChemistryReader


--> FOAM FATAL ERROR:
Unknown reaction type irreversiblePropaneMainReaction

Valid reaction types are :

30
(
irreversibleArrheniusLindemannChemicallyActivatedR eaction
irreversibleArrheniusLindemannFallOffReaction
irreversibleArrheniusReaction
irreversibleArrheniusSRIChemicallyActivatedReactio n
irreversibleArrheniusSRIFallOffReaction
irreversibleArrheniusTroeChemicallyActivatedReacti on
irreversibleArrheniusTroeFallOffReaction
irreversibleJanevReaction
irreversibleLandauTellerReaction
irreversibleLangmuirHinshelwoodReaction
irreversibleinfiniteReaction
irreversiblepowerSeriesReaction
irreversiblethirdBodyArrheniusReaction
nonEquilibriumReversibleArrheniusReaction
nonEquilibriumReversibleLandauTellerReaction
nonEquilibriumReversibleinfiniteReaction
nonEquilibriumReversiblethirdBodyArrheniusReaction
reversibleArrheniusLindemannChemicallyActivatedRea ction
reversibleArrheniusLindemannFallOffReaction
reversibleArrheniusReaction
reversibleArrheniusSRIChemicallyActivatedReaction
reversibleArrheniusSRIFallOffReaction
reversibleArrheniusTroeChemicallyActivatedReaction
reversibleArrheniusTroeFallOffReaction
reversibleJanevReaction
reversibleLandauTellerReaction
reversibleLangmuirHinshelwoodReaction
reversibleinfiniteReaction
reversiblepowerSeriesReaction
reversiblethirdBodyArrheniusReaction
)


From function Reaction<ReactionThermo>::New(const speciesTable&, const HashPtrTable<ReactionThermo>&, const dictionary&)
in file /home/fluent/OpenFOAM/OpenFOAM-2.0.x/src/thermophysicalModels/specie/lnInclude/Reaction.C at line 353.

FOAM exiting


In my Make directory I have:
- files:

makeReactionThermoReactions.C

LIB = $(FOAM_USER_LIBBIN)/libPropaneMainReactionRate


- options:
EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude

EXE_LIBS = \
-
1thermophysicalModels/specie

In my controlDict file I added:
libs ("libPropaneMainReactionRate.so")

Thanks in advance for any hint,

Matari


wyldckat August 26, 2012 07:45

Greetings Matari,

Try this:
Code:

wclean libso
wmake libso

The libso reference is needed for cleaning as well.

Best regards,
Bruno


All times are GMT -4. The time now is 20:42.