|
[Sponsors] |
June 24, 2013, 05:24 |
interFoam symbol lookup error
|
#1 |
Senior Member
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17 |
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 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" 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 Thanks |
|
June 24, 2013, 06:55 |
|
#2 | |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24 |
Dear foresst
in Make folder, in Options files, you should add Quote:
__________________
My Personal Website (http://nimasamkhaniani.ir/) Telegram channel (https://t.me/cfd_foam) |
||
June 24, 2013, 08:21 |
|
#3 |
Senior Member
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17 |
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. |
|
June 24, 2013, 08:41 |
|
#4 |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24 |
i can not unextract your zip file
__________________
My Personal Website (http://nimasamkhaniani.ir/) Telegram channel (https://t.me/cfd_foam) |
|
June 25, 2013, 21:24 |
|
#5 |
Senior Member
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17 |
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 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 |
|
June 26, 2013, 01:01 |
|
#6 | |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24 |
Quote:
__________________
My Personal Website (http://nimasamkhaniani.ir/) Telegram channel (https://t.me/cfd_foam) |
||
July 11, 2013, 03:27 |
fatal error
|
#7 |
Member
Mohammad Bahreini
Join Date: Dec 2012
Posts: 36
Rep Power: 13 |
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 |
|
July 11, 2013, 06:34 |
|
#8 |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24 |
Dear mohamad
when you use an include file! you should tell the compiler where to find it
__________________
My Personal Website (http://nimasamkhaniani.ir/) Telegram channel (https://t.me/cfd_foam) |
|
September 17, 2013, 05:31 |
|
#9 | |
Senior Member
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17 |
Quote:
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 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. |
||
|
|
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 04: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 18:44 |