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

trouble compiling an OF BC

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

Like Tree1Likes
  • 1 Post By mirko

Reply
 
LinkBack Thread Tools Display Modes
Old   January 24, 2011, 17:06
Default trouble compiling an OF BC
  #1
Senior Member
 
Mirko Vukovic
Join Date: Mar 2009
Posts: 159
Rep Power: 7
mirko is on a distinguished road
Hello,

I am building a boundary condition based on oscillatingFixedValue. I started off by copying oscillatingFixedValue in my local directory. Unfortunately, it does not compile. This is what I did so far:
  • Copied the files from .../src/finiteVolume/fields/fvPatchFields/derived/...
  • Removed oscillatingFixedValue.dep
  • Created Make/files & Make/options using the files in .../src/finiteVolume/Make/... as guides
wmake then gives the following error:
Code:
Making dependency list for source file oscillatingFixedValue/oscillatingFixedValueFvPatchFields.C
SOURCE=oscillatingFixedValue/oscillatingFixedValueFvPatchFields.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-40 -I/opt/OpenFOAM/OpenFOAM-1.7.1/src/finiteVolume/lnInclude     -I/opt/OpenFOAM/OpenFOAM-1.7.1/src/triSurface/lnInclude     -I/opt/OpenFOAM/OpenFOAM-1.7.1/src/meshTools/lnInclude -IlnInclude -I. -I/opt/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude -I/opt/OpenFOAM/OpenFOAM-1.7.1/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/oscillatingFixedValueFvPatchFields.o
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-40 -I/opt/OpenFOAM/OpenFOAM-1.7.1/src/finiteVolume/lnInclude     -I/opt/OpenFOAM/OpenFOAM-1.7.1/src/triSurface/lnInclude     -I/opt/OpenFOAM/OpenFOAM-1.7.1/src/meshTools/lnInclude -IlnInclude -I. -I/opt/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude -I/opt/OpenFOAM/OpenFOAM-1.7.1/src/OSspecific/POSIX/lnInclude   -fPIC Make/linux64GccDPOpt/oscillatingFixedValueFvPatchFields.o -L/opt/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt \
              -lOpenFOAM -liberty -ldl   -lm -o OpenFOAM.out
/usr/lib/../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
Make/linux64GccDPOpt/oscillatingFixedValueFvPatchFields.o: In function `global constructors keyed to oscillatingFixedValueFvPatchFields.C':
oscillatingFixedValueFvPatchFields.C:(.text+0x1217): undefined reference to `Foam::fvPatchField<double>::constructpatchConstructorTables()'
oscillatingFixedValueFvPatchFields.C:(.text+0x1232): undefined reference to `Foam::fvPatchField<double>::patchConstructorTablePtr_'
oscillatingFixedValueFvPatchFields.C:(.text+0x1255): undefined reference to `Foam::fvPatchField<double>::constructpatchMapperConstructorTables()'
oscillatingFixedValueFvPatchFields.C:(.text+0x1270): undefined reference to `Foam::fvPatchField<double>::patchMapperConstructorTablePtr_'
oscillatingFixedValueFvPatchFields.C:(.text+0x1293): undefined reference to `Foam::fvPatchField<double>::constructdictionaryConstructorTables()'
oscillatingFixedValueFvPatchFields.C:(.text+0x12ae): undefined reference to `Foam::fvPatchField<double>::dictionaryConstructorTablePtr_'
oscillatingFixedValueFvPatchFields.C:(.text+0x130c): undefined reference to `Foam::fvPatchField<Foam::Vector<double> >::constructpatchConstructorTables()'
oscillatingFixedValueFvPatchFields.C:(.text+0x1327): undefined reference to `Foam::fvPatchField<Foam::Vector<double> >::patchConstructorTablePtr_'
oscillatingFixedValueFvPatchFields.C:(.text+0x134a): undefined reference to `Foam::fvPatchField<Foam::Vector<double> >::constructpatchMapperConstructorTables()'
oscillatingFixedValueFvPatchFields.C:(.text+0x1365): undefined reference to `Foam::fvPatchField<Foam::Vector<double> >::patchMapperConstructorTablePtr_'
oscillatingFixedValueFvPatchFields.C:(.text+0x1388): undefined reference to `Foam::fvPatchField<Foam::Vector<double> >::constructdictionaryConstructorTables()'
oscillatingFixedValueFvPatchFields.C:(.text+0x13a3): undefined reference to `Foam::fvPatchField<Foam::Vector<double> >::dictionaryConstructorTablePtr_'
oscillatingFixedValueFvPatchFields.C:(.text+0x1401): undefined reference to `Foam::fvPatchField<Foam::SphericalTensor<double> >::constructpatchConstructorTables()'
...
What else am I missing? I am attaching my files

Thanks,

Mirko
Attached Files
File Type: gz userBCs.tar.gz (3.6 KB, 10 views)
mirko is offline   Reply With Quote

Old   January 28, 2011, 18:02
Default Problem solved
  #2
Senior Member
 
Mirko Vukovic
Join Date: Mar 2009
Posts: 159
Rep Power: 7
mirko is on a distinguished road
I solved the problem by using the correct build tool. I was using

> wmake

Instead, as I am building a library, and not an executable, I should have used

> wmake libso
romant likes this.
mirko is offline   Reply With Quote

Old   April 12, 2011, 09:36
Default
  #3
Member
 
xianghong wu
Join Date: Mar 2009
Posts: 57
Rep Power: 7
wendywu is on a distinguished road
Quote:
Originally Posted by mirko View Post
I solved the problem by using the correct build tool. I was using

> wmake

Instead, as I am building a library, and not an executable, I should have used

> wmake libso
hi,

I added a viscosity model into the viscosity model family, like other viscosity models, it is a folder " myViscosityModel" , in which there are "myViscosityModel.C" and "myViscosityModel.H". so I want to recompile the code, I used wmake, there are a lot of information, but there is one error, I can not find the problem.
I just read your message, Could you tell me if I could use " wmake libso " instead?

Thank you.
Wendy
wendywu is offline   Reply With Quote

Old   April 13, 2011, 10:23
Default
  #4
Senior Member
 
Mirko Vukovic
Join Date: Mar 2009
Posts: 159
Rep Power: 7
mirko is on a distinguished road
Quote:
Originally Posted by wendywu View Post
hi,

I added a viscosity model into the viscosity model family, like other viscosity models, it is a folder " myViscosityModel" , in which there are "myViscosityModel.C" and "myViscosityModel.H". so I want to recompile the code, I used wmake, there are a lot of information, but there is one error, I can not find the problem.
I just read your message, Could you tell me if I could use " wmake libso " instead?

Thank you.
Wendy
Yes, you should compile it with `wmake libso' command.

Mirko
mirko is offline   Reply With Quote

Old   April 14, 2011, 03:20
Default
  #5
Member
 
xianghong wu
Join Date: Mar 2009
Posts: 57
Rep Power: 7
wendywu is on a distinguished road
Quote:
Originally Posted by mirko View Post
Yes, you should compile it with `wmake libso' command.

Mirko
Thank you, I will try
wendywu 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
Compile calcMassFlowC aurore OpenFOAM Programming & Development 12 March 18, 2014 05:22
compiling icoStructFoam error using OF1.7 mhassani OpenFOAM Installation 7 June 11, 2012 09:22
Help with KIVA4 source code compiling geothokar Main CFD Forum 0 September 3, 2010 05:40
OpenFOAM-1.5-dev compilation: OSspecific trouble gwierink OpenFOAM Installation 1 September 24, 2009 09:35
Trouble compiling on Debian Etch jkr OpenFOAM Installation 2 April 14, 2006 14:56


All times are GMT -4. The time now is 13:09.