|
[Sponsors] |
March 31, 2011, 11:23 |
Problem linking library
|
#1 |
Senior Member
Robert Sawko
Join Date: Mar 2009
Posts: 117
Rep Power: 22 |
Dear All,
I am trying to rewrite turbulence models library for multiphase flows. To this end I have created my own library libInterRASModels.so and with its own turbulenceModel definition. I wanted it to be seperate from incompressible and compressible turbulence models so I created my onw namespace: multiphase. The library compiles but for some reason I cannot link it to my customised interFoam. The only part that I changed is: Code:
// Construct incompressible turbulence model autoPtr<multiphase::turbulenceModel> turbulence ( multiphase::turbulenceModel::New(U, rhoPhi, rho, twoPhaseProperties) ); Code:
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O0 -fdefault-inline -ggdb3 -DFULLDEBUG -DNoRepository -ftemplate-depth-40 -I/home/c111269/OpenFOAM/OpenFOAM-1.7.1/src/transportModels -I/home/c111269/OpenFOAM/OpenFOAM-1.7.1/src/transportModels/incompressible/lnInclude -I/home/c111269/OpenFOAM/OpenFOAM-1.7.1/src/transportModels/interfaceProperties/lnInclude -I/home/c111269/OpenFOAM/c111269-1.7.1/src/turbulenceModels/multiphase/turbulenceModel -I/home/c111269/OpenFOAM/OpenFOAM-1.7.1/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/c111269/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude -I/home/c111269/OpenFOAM/OpenFOAM-1.7.1/src/OSspecific/POSIX/lnInclude -fPIC Make/linux64GccDPDebug/interFoam.o -L/home/c111269/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPDebug \ -linterfaceProperties -lincompressibleTransportModels -lfiniteVolume -L/home/c111269/OpenFOAM/c111269-1.7.1/lib/linux64GccDPDebug/ -lInterRASModels -lOpenFOAM -liberty -ldl -ggdb3 -DFULLDEBUG -lm -o /home/c111269/OpenFOAM/c111269-1.7.1/applications/bin/linux64GccDPDebug/cIFp1 Make/linux64GccDPDebug/interFoam.o: In function `main': /home/c111269/OpenFOAM/c111269-1.7.1/solvers/marking/createFields.H:95: undefined reference to `Foam::multiphase::turbulenceModel::New(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::transportModel&)' /home/c111269/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPDebug/libInterRASModels.so: undefined reference to `Foam::multiphase::turbulenceModel::correct()' /home/c111269/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPDebug/libInterRASModels.so: undefined reference to `Foam::incompressible::autoCreateLowReNut(Foam::word const&, Foam::fvMesh const&)' /home/c111269/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPDebug/libInterRASModels.so: undefined reference to `Foam::multiphase::turbulenceModel::destroyturbulenceModelConstructorTables()' /home/c111269/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPDebug/libInterRASModels.so: undefined reference to `Foam::multiphase::turbulenceModel::turbulenceModelConstructorTablePtr_' /home/c111269/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPDebug/libInterRASModels.so: undefined reference to `Foam::multiphase::turbulenceModel::turbulenceModel(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::transportModel&)' /home/c111269/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPDebug/libInterRASModels.so: undefined reference to `Foam::multiphase::turbulenceModel::typeName' /home/c111269/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPDebug/libInterRASModels.so: undefined reference to `Foam::multiphase::turbulenceModel::constructturbulenceModelConstructorTables()' collect2: ld returned 1 exit status make: *** [/home/c111269/OpenFOAM/c111269-1.7.1/applications/bin/linux64GccDPDebug/cIFp1] Error 1 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Commercial meshers] Handling cyclic BC from gambit to openfoam for a cascade airfoil problem - OF 1.6 | maverick | OpenFOAM Meshing & Mesh Conversion | 2 | June 18, 2011 04:36 |
ParaView 3.8.0 problem on debian | Unseen | OpenFOAM Installation | 4 | August 16, 2010 10:26 |
Strange Problem With updating the library | farhagim | OpenFOAM | 0 | August 10, 2010 12:34 |
Velocity profiles problem behind the elbow (3D problem) | kabat73 | FLUENT | 8 | May 9, 2010 04:26 |
Adiabatic and Rotating wall (Convection problem) | ParodDav | CFX | 5 | April 29, 2007 19:13 |