CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Could not lad shared library: dlopen error undefined symbol (https://www.cfd-online.com/Forums/openfoam-programming-development/192264-could-not-lad-shared-library-dlopen-error-undefined-symbol.html)

Clarkyan August 31, 2017 16:55

Could not lad shared library: dlopen error undefined symbol
 
Dear foamers,

I am trying to write a new dynamic motion solver on the basis of "velocityLaplacian". I copied the source codes of "velocityLaplacian" and wrote to a new library "libMyfvMotionSolvers.so".

The code compiles but when I run the simulation (using interDyMFoam), the following error message comes up (dlopen error):


Code:


Selecting motion solver: velocityLaplacian
--> FOAM Warning :
    From function dlOpen(const fileName&, const bool)
    in file POSIX.C at line 1179
    dlopen error : /home/xiaohui/OpenFOAM/xiaohui-2.3.1/platforms/linux64GccDPOpt/lib/libMyfvMotionSolvers.so: undefined symbol: _ZN4Foam18fvMotionSolverCore5debugE
--> FOAM Warning :
    From function dlLibraryTable::open(const fileName&, const bool)
    in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99
    could not load "libMyfvMotionSolvers.so"
--> FOAM Warning :
    From function dlLibraryTable::open(const dictionary&, const word&, const TablePtr&)
    in file /home/openfoam/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude/dlLibraryTableTemplates.C at line 67
    Could not open library "libMyfvMotionSolvers.so"



--> FOAM FATAL ERROR:
solver table is empty

    From function motionSolver::New(const polyMesh& mesh)
    in file motionSolver/motionSolver/motionSolver.C at line 116.

FOAM exiting

I tried the following methods but none of them works:
1) change the names;
2) add links to dynamicMesh and dynamicFvMesh etc.;
3) re-install swak4Foam;
etc.


Can anybody drop a hint? Thanks in advance.

Regards,
Clark


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