|
[Sponsors] |
New dynamic mesh rule with symbol lookup error |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 2, 2017, 23:42 |
New dynamic mesh rule with symbol lookup error (Solved)
|
#1 |
New Member
Jue Wang
Join Date: Apr 2014
Posts: 23
Rep Power: 12 |
Hi, Foamers,
I just touched the openfoam programing. I tried to create a new dynamic mesh rule but came across difficulties at the first step. The development is based on OpenFOAM-extend-4.0. I tried the followings: 1. I created myMovingBodyTopoFvMesh based on movingBodyFvMesh without any changes but the name and successfully complied (wmake libso) it. I added dynamicFvMeshLibs ("libmyMovingBodyTopoFvMesh.so") to constant/dynamicMeshDict of the case in tutorial and it ran well. 2. Then I created a new meshmotion rule, i.e. mylinearOscillation based on linearOscillation, and successfully compiled (wmake libso) it (no errors show up). Then I changed the linearOscillation to mylinearOscillation in the constant/dynamicMeshDict of the tutorial. But the new mylinearOscillation was not recognized. 3. To solve the problem in 2, I tried the following: 1) I copied the whole solidBodyMotion folder, which contains the linearOscillation folder, as mysolidBodyMotion. I renamed every folders and files and did relevant changes in the Make/files and options. Then they were compiled (wmake libso) successfully. 2) I updated solidBodyMotionFunction with mysolidBodyMotionFunction in the myMovingBodyTopoFvMesh files. I also changed relevant files, including the directory in Make/options. myMovingBodyTopoFvMesh was successfully compiled (wmake libso) then. 3) I made relevant changes in the constant/dynamicMeshDict and ran the tutorial. It gave an error: icoDyMSimpleFoam: symbol lookup error: /home/civil/foam/civil-4.0/lib/linux64GccDPOpt/libmyMovingBodyTopoFvMesh.so: undefined symbol: _ZN4Foam25mysolidBodyMotionFunction3NewERKNS_10dic tionaryERKNS_4TimeE Does anyone know how to fix it? Really appreciate. BTW, when I changed the Make/options file, I know how to change the EXE_INC part. But how about the LIB_LIBS part? When I made the following changes: EXE_INC = \ -I$(WM_PROJECT_USER_DIR)/src/dynamicMesh/meshMotion/mysolidBodyMotion/lnInclude LIB_LIBS = \ -lmysolidBodyMotion the LIB_LIBS change was not recognized. I'm not sure if it's the key problem. But I also noticed I can even delete the LIB_LIBS part and the compilation still worked. It was really hard for me. Hope anyone could offer me some advice. Thanks. Joe Last edited by Joe Wang; October 24, 2017 at 22:07. |
|
October 24, 2017, 22:09 |
|
#2 |
New Member
Jue Wang
Join Date: Apr 2014
Posts: 23
Rep Power: 12 |
I solved this problem by changing the Make/options file like
LIB_LIBS = \ -L $(FOAM_USER_LIBBIN) \ -lmysolidBodyMotion and then it could be corrected built. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Building OpenFOAM1.7.0 from source | ata | OpenFOAM Installation | 46 | March 6, 2022 14:21 |
DPM udf error | haghshenasfard | FLUENT | 0 | April 13, 2016 07:35 |
CGNS Compiling | Diego | Main CFD Forum | 17 | December 21, 2014 02:40 |
Undeclared Identifier Errof UDF | SteveGoat | Fluent UDF and Scheme Programming | 7 | October 15, 2014 08:11 |
CGNS lib and Fortran compiler | manaliac | Main CFD Forum | 2 | November 29, 2010 07:25 |