CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

undefined symbol error

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 7, 2019, 07:42
Default undefined symbol error
  #1
New Member
 
Ian
Join Date: Aug 2018
Posts: 15
Rep Power: 8
insane is on a distinguished road
Hi everyone
Recently, I developed a new class named ControllerStateProvider in the src fold and use the allwmake to compile it and there is no error.
After that, I modify the rigidbodyState (a function object to get the state of moving body) and add several lines about the ControllerStateProvider class , and I have modify the option of the rigidbodyState, just like this

Code:
EXE_INC = \
    -I$(LIB_SRC)/finiteVolume/lnInclude \
    -I$(LIB_SRC)/dynamicMesh/lnInclude \
    -I$(LIB_SRC)/dynamicFvMesh/lnInclude \
    -I$(LIB_SRC)/ControllerStateProvider/lnInclude \
    -I$(LIB_SRC)/rigidBodyDynamics/lnInclude \
    -I$(LIB_SRC)/rigidBodyMeshMotion/lnInclude \
    -I$(LIB_SRC)/OpenFOAM/lnInclude \
    -I$(LIB_SRC)/meshTools/lnInclude 
    

LIB_LIBS = \
    -lfiniteVolume \
    -lmeshTools \
    -L $(FOAM_LIBBIN) \
    -L $(FOAM_USER_LIBBIN) \
    -lControllerStateProvider \
    -ldynamicFvMesh \
I also include the ControllerStateProvider.H in the rigidbodyState.C and rigidbodyState could be successfully compiled.

but when I run a test case which use the interDyMFoam, it shows warning just like this

Code:
--> FOAM Warning : 
    From function void* Foam::dlOpen(const Foam::fileName&, bool)
    in file POSIX.C at line 1604
    dlopen error : /home/ian/OpenFOAM/ian-v1712/platforms/linux64GccDPInt32Opt/lib/librigidBodyState.so: undefined symbol: _ZN4Foam23ControllerStateProvider8positionE
--> FOAM Warning : 
    From function bool Foam::dlLibraryTable::open(const Foam::fileName&, bool)
    in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 105
    could not load "librigidBodyState.so"
--> FOAM Warning : 
    From function bool Foam::dlLibraryTable::open(const Foam::dictionary&, const Foam::word&, const TablePtr&) [with TablePtr = Foam::HashTable<Foam::autoPtr<Foam::functionObject> (*)(const Foam::word&, const Foam::Time&, const Foam::dictionary&), Foam::word, Foam::string::hash>*]
    in file lnInclude/dlLibraryTableTemplates.C at line 62
    Could not open library "librigidBodyState.so"
It's clear that the function object could not work, I am sure it works before the modification of rigidbodyState. And I have read several threads similar to this error which said it can be fixed by adding the corresponding lib in the option, but i have already added ControllerStateProvider in the option file .
Could anyone offer some advice? It will be much appreciated!
insane is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile calcMassFlowC aurore OpenFOAM Programming & Development 13 March 23, 2018 08:43
Errors in UDF shashank312 Fluent UDF and Scheme Programming 6 May 30, 2013 21:30
Compile problem ivanyao OpenFOAM Running, Solving & CFD 1 October 12, 2012 10:31
CGNS lib and Fortran compiler manaliac Main CFD Forum 2 November 29, 2010 07:25
POSDAT problem piotka STAR-CD 4 June 12, 2009 09:43


All times are GMT -4. The time now is 01:44.