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

interFoam symbol lookup error

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By sharonyue

Reply
 
LinkBack Thread Tools Display Modes
Old   June 24, 2013, 05:24
Default interFoam symbol lookup error
  #1
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Torino, Italy
Posts: 667
Rep Power: 8
sharonyue is on a distinguished road
Hi,

I am a newbie to linux.so its a mass when I compile my solver.

I changed the code in "twoPhaseMixture", and rename it "myTwoPhaseMixture" and this is the code in make/file:
Code:
myTwoPhaseMixture.C

LIB = $(FOAM_USER_LIBBIN)/libincompressibleTransportModels
Then I wamke libso, succeed.

In interFoam, I revise it like this, and name it as myinterFoam, except this nothing changed:
Code:
#include "/home/cfd/myCase/mylib/twoPhaseMixture/myTwoPhaseMixture.H"
and wmake successful.

But when I run myinterFoam, it said:
Code:
myinterFoam: symbol lookup error: /home/cfd/OpenFOAM/cfd-2.2.0/platforms/linux64GccDPOpt/lib/libincompressibleTransportModels.so: undefined symbol: _ZTIN4Foam14transportModelE
Anyone knows how to handle this?
Thanks
sharonyue is offline   Reply With Quote

Old   June 24, 2013, 06:55
Default
  #2
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,123
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
Dear foresst
in Make folder, in Options files, you should add
Quote:
-L$(FOAM_USER_LIBBIN) \
-lincompressibleTransportModel
__________________
Training Course on OpenFOAM at (http://www.isme.ir/)
My Weblog (http://openfoam.blogfa.com/)
nimasam is offline   Reply With Quote

Old   June 24, 2013, 08:21
Default
  #3
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Torino, Italy
Posts: 667
Rep Power: 8
sharonyue is on a distinguished road
Quote:
Originally Posted by nimasam View Post
Dear foresst
in Make folder, in Options files, you should add
Hi Nima,

It works, but there are some other problems: In order to find out whether its incurred by my code, I make a test:

(1) copy twoPhaseMixture.C and twoPhaseMixture.H to my folder
(2) wmake libso
(3) copy interFoam too my folder
(4) wmake.

But it said "undefined reference", This time I didnot touch any code, so I dont know whats wrong with this. I attach my code, If you have time, could you please help me to check it out? I believe its easy for you. Thanks.
Attached Files
File Type: gz myCase.tar.gz (10.0 KB, 13 views)
sharonyue is offline   Reply With Quote

Old   June 24, 2013, 08:41
Default
  #4
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,123
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
i can not unextract your zip file
__________________
Training Course on OpenFOAM at (http://www.isme.ir/)
My Weblog (http://openfoam.blogfa.com/)
nimasam is offline   Reply With Quote

Old   June 25, 2013, 21:24
Default
  #5
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Torino, Italy
Posts: 667
Rep Power: 8
sharonyue is on a distinguished road
I think I compile the lib successfully, but problem arises in compiling the solver.
this is my option:
Code:
EXE_INC = \
    -I$(LIB_SRC)/transportModels \
    -I $home/cfd/myCase/mylib/incompressibleTwoPhaseMixture/incompressible/lnInclude \
    -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
    -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
    -I$(LIB_SRC)/finiteVolume/lnInclude \
    -I$(LIB_SRC)/meshTools/lnInclude \
    -I$(LIB_SRC)/fvOptions/lnInclude \
    -I$(LIB_SRC)/sampling/lnInclude

EXE_LIBS = \
    -linterfaceProperties \
    -ltwoPhaseInterfaceProperties \
    -lincompressibleTurbulenceModel \
    -lincompressibleRASModels \
    -lincompressibleLESModels \
    -lfiniteVolume \
    -lmeshTools \
    -lfvOptions \
    -lsampling \
    -L$(FOAM_USER_LIBBIN) \ 
    -lincompressibleTransportModels
when I wmake, it said:
Code:
cfd@cfd:~/myCase/solvers/interFoam$ wmake
options:22:27: warning: backslash and newline separated by space [enabled by default]
SOURCE=interFoam.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -I. -I/opt/openfoam220/src/transportModels -I ome/cfd/myCase/mylib/incompressibleTwoPhaseMixture/incompressible/lnInclude -I/opt/openfoam220/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam220/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam220/src/finiteVolume/lnInclude -I/opt/openfoam220/src/meshTools/lnInclude -I/opt/openfoam220/src/fvOptions/lnInclude -I/opt/openfoam220/src/sampling/lnInclude -IlnInclude -I. -I/opt/openfoam220/src/OpenFOAM/lnInclude -I/opt/openfoam220/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/interFoam.o
interFoam.C:44:29: fatal error: twoPhaseMixture.H: No such file or directory
compilation terminated.
make: *** [Make/linux64GccDPOpt/interFoam.o] Error 1
But this file is in that folder.
mecman likes this.
sharonyue is offline   Reply With Quote

Old   June 26, 2013, 01:01
Default
  #6
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,123
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
Quote:
twoPhaseMixture.H: No such file or directory compilation terminated.
did you include it properly in right path?
__________________
Training Course on OpenFOAM at (http://www.isme.ir/)
My Weblog (http://openfoam.blogfa.com/)
nimasam is offline   Reply With Quote

Old   July 11, 2013, 03:27
Default fatal error
  #7
Member
 
Mohammad Bahreini
Join Date: Dec 2012
Posts: 35
Rep Power: 4
mecman is on a distinguished road
Hi Forrest
i have problem same youre problem....do You solve this problem?if you solve,can you help me?
my error:
interFoamDiabatic.C:44:29: fatal error: twoPhaseMixture.H: No such file or directory
compilation terminated.
make: *** [Make/linux64GccDPOpt/interFoamDiabatic.o] Error 1

mecman is offline   Reply With Quote

Old   July 11, 2013, 06:34
Default
  #8
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,123
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
Dear mohamad
when you use an include file! you should tell the compiler where to find it
__________________
Training Course on OpenFOAM at (http://www.isme.ir/)
My Weblog (http://openfoam.blogfa.com/)
nimasam is offline   Reply With Quote

Old   September 17, 2013, 05:31
Default
  #9
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Torino, Italy
Posts: 667
Rep Power: 8
sharonyue is on a distinguished road
Quote:
Originally Posted by nimasam View Post
Dear mohamad
when you use an include file! you should tell the compiler where to find it
Sorry, I still cant wmake it.

I "wmake libso" my twophasemixture.c , then in interFoam, I change it into this:
Code:
EXE_INC = \
    -I$(LIB_SRC)/transportModels \
    -I$(LIB_SRC)/transportModels/incompressible/lnInclude \
    -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
    -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
    -I$(LIB_SRC)/finiteVolume/lnInclude \
    -I$(LIB_SRC)/meshTools/lnInclude \
    -I$(LIB_SRC)/fvOptions/lnInclude \
    -I$(LIB_SRC)/sampling/lnInclude 

EXE_LIBS = \
    -linterfaceProperties \
    -ltwoPhaseInterfaceProperties \ 
    -lincompressibleTurbulenceModel \
    -lincompressibleRASModels \
    -lincompressibleLESModels \
    -lfiniteVolume \
    -lmeshTools \
    -lfvOptions \
    -lsampling  \
    -L$(FOAM_USER_LIBBIN) \ 
    -lmyincompressibleTransportModel
but it said: cannot find -lmyincompressibleTransportModel

but I have a myincompressibleTransportModels.so in my FOAM_USER_LIBBIN folder.


Sorry, my fault, it should be -lmyincompressibleTransportModels

Last edited by sharonyue; September 17, 2013 at 08:05.
sharonyue is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Undeclared Identifier Errof UDF SteveGoat Fluent UDF and Scheme Programming 7 October 15, 2014 07:11
Errors in UDF shashank312 Fluent UDF and Scheme Programming 6 May 30, 2013 20:30
using METIS functions in fortran dokeun Main CFD Forum 7 January 29, 2013 05:06
Compile problem ivanyao OpenFOAM Running, Solving & CFD 1 October 12, 2012 09:31
How to install CGNS under windows xp? lzgwhy Main CFD Forum 1 January 11, 2011 19:44


All times are GMT -4. The time now is 18:32.