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

Undefined reference

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 27, 2008, 16:42
Default Hi All, I want to calculate
  #1
New Member
 
Mateusz Slowikowski
Join Date: Mar 2009
Location: Waterloo, Canada
Posts: 12
Rep Power: 17
mateusz_slowikowski is on a distinguished road
Hi All,

I want to calculate the upper incomplete gamma function, which I have as a function inside a new model, and use it for further applications. However, I'm running into this error:

/home/slowiko/OpenFOAM/slowiko-1.4/lib/linux64Gcc4DPOpt/libnewModel.so: undefined reference to `Foam::newModel::gammaL(double, Foam::GeometricField<double,>&)'
collect2: ld returned 1 exit status
make: *** [/home/slowiko/OpenFOAM/slowiko-1.4/applications/bin/linux64Gcc4DPOpt/testFoam] Error 1

when I go into the ~/newmodel directory and do a "wmake libso" I don't get any errors. I also tried to "wclean" in the aforementioned directory before the "wmake libso" then a "./Allwmake" (and) a "wmake" after, however this doesn't seem to solve my problem. Any suggestions?
mateusz_slowikowski is offline   Reply With Quote

Old   March 28, 2008, 05:14
Default hi, did you use the "static
  #2
Senior Member
 
Stephan Gerber
Join Date: Mar 2009
Location: Germany
Posts: 118
Rep Power: 17
stephan is on a distinguished road
hi,

did you use the "static" keyword somewhere in your class?
stephan
stephan is offline   Reply With Quote

Old   March 28, 2008, 09:27
Default Basically, I'm doing some modi
  #3
New Member
 
Mateusz Slowikowski
Join Date: Mar 2009
Location: Waterloo, Canada
Posts: 12
Rep Power: 17
mateusz_slowikowski is on a distinguished road
Basically, I'm doing some modifications to the two phase euler foam code. This particular model is based on the structure of the phase model (a little more complicated, but similar structure)
the only "static" anything that I used was in the selector:

// Selectors
//- Return a reference to the selected new model
static autoPtr<newmodel> New
(
PtrList<volvectorfield>& U_temp,
PtrList<volscalarfield>& prprty_temp,
const IOdictionary& transdict,
const IOdictionary& prprtydict
);
mateusz_slowikowski is offline   Reply With Quote

Old   March 28, 2008, 09:34
Default I should probably say however:
  #4
New Member
 
Mateusz Slowikowski
Join Date: Mar 2009
Location: Waterloo, Canada
Posts: 12
Rep Power: 17
mateusz_slowikowski is on a distinguished road
I should probably say however: I was using a function under the same name earlier. I didn't need it, and deleted it. Later, I added a different function (the gamma function calculated a different way) back.
mateusz_slowikowski is offline   Reply With Quote

Old   March 28, 2008, 17:39
Default hi, i thought it could be a
  #5
Senior Member
 
Stephan Gerber
Join Date: Mar 2009
Location: Germany
Posts: 118
Rep Power: 17
stephan is on a distinguished road
hi,

i thought it could be a problem with the definition and declaration of static members - which may cause similar errors.
stephan
stephan is offline   Reply With Quote

Old   March 28, 2008, 21:03
Default Hello Mateusz, Your problem
  #6
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,902
Rep Power: 33
hjasak will become famous soon enough
Hello Mateusz,

Your problem is that the .C file containing function definition (function body) for

newModel::gammaL(double, Foam::GeometricField<double,>&)

either did not compile correctly or is not on a list of files but it exists in the header of the class newModel.

If you want to use it, it has got to be defined to make the linker happy; if you do not want it, delete its declaration from the header file.

Hope this helps,

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   March 31, 2008, 17:03
Default Hrv, Right on the money - I
  #7
New Member
 
Mateusz Slowikowski
Join Date: Mar 2009
Location: Waterloo, Canada
Posts: 12
Rep Power: 17
mateusz_slowikowski is on a distinguished road
Hrv,

Right on the money - I guess a mistake like that serves me right for trying to rush through the code while still being a newbie.. thanks again for the help.

Mateusz
mateusz_slowikowski is offline   Reply With Quote

Old   February 27, 2015, 15:35
Default
  #8
New Member
 
karar
Join Date: Feb 2013
Posts: 13
Rep Power: 13
zoptirik is on a distinguished road
Quote:
Originally Posted by mateusz_slowikowski View Post
Hi All,

I want to calculate the upper incomplete gamma function, which I have as a function inside a new model, and use it for further applications. However, I'm running into this error:

/home/slowiko/OpenFOAM/slowiko-1.4/lib/linux64Gcc4DPOpt/libnewModel.so: undefined reference to `Foam::newModel::gammaL(double, Foam::GeometricField<double,>&)'
collect2: ld returned 1 exit status
make: *** [/home/slowiko/OpenFOAM/slowiko-1.4/applications/bin/linux64Gcc4DPOpt/testFoam] Error 1

when I go into the ~/newmodel directory and do a "wmake libso" I don't get any errors. I also tried to "wclean" in the aforementioned directory before the "wmake libso" then a "./Allwmake" (and) a "wmake" after, however this doesn't seem to solve my problem. Any suggestions?

I want to calculate the lower incomplete gamma function, which I have as a function inside a new model too. lower incomplete gamma functions includes a magnitude U. I tried to use gnu math functions but it gave me prameter type error. I stucked that error. Can you help me calculating incomplete gamma.

Best
zoptirik is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[OpenFOAM.com] Undefined reference to %60yyFlexLexeryywrapb arjaan OpenFOAM Installation 13 June 1, 2016 13:33
Undefined reference to %60mainb seang OpenFOAM Installation 8 February 1, 2014 14:48
Undefined reference to %60yyFlexLexeryywrapb zhoubinwx OpenFOAM Bugs 1 May 28, 2008 06:57
Undefined reference mateusz_slowikowski OpenFOAM Running, Solving & CFD 3 March 11, 2008 13:19
MPICH : undefined reference to.. Vincent Siemens 3 March 24, 2005 13:30


All times are GMT -4. The time now is 02:26.