CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   trouble compiling an OF BC (http://www.cfd-online.com/Forums/openfoam-programming-development/84257-trouble-compiling-bc.html)

mirko January 24, 2011 18:06

trouble compiling an OF BC
 
1 Attachment(s)
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

mirko January 28, 2011 19:02

Problem solved
 
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

wendywu April 12, 2011 09:36

Quote:

Originally Posted by mirko (Post 292726)
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

mirko April 13, 2011 10:23

Quote:

Originally Posted by wendywu (Post 303275)
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

wendywu April 14, 2011 03:20

Quote:

Originally Posted by mirko (Post 303445)
Yes, you should compile it with `wmake libso' command.

Mirko

Thank you, I will try


All times are GMT -4. The time now is 16:58.