CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Bugs (
-   -   wmake error for a new viscosity model (

ICL October 27, 2009 12:12

wmake error for a new viscosity model
Hey guyz,

I got the following errors when I tried to compile (wmake) a viscosity model. Everything was fine before with the same change. I don`t really know why I got these errors now:

incompressible]$ wmake
g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I.. -I/home/ahajisha/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/ahajisha/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/home/ahajisha/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude -fPIC Make/linux64GccDPOpt/transportModel.o Make/linux64GccDPOpt/singlePhaseTransportModel.o Make/linux64GccDPOpt/viscosityModel.o Make/linux64GccDPOpt/newViscosityModel.o Make/linux64GccDPOpt/Roelands.o Make/linux64GccDPOpt/EyringRoelands.o Make/linux64GccDPOpt/Doolittle.o Make/linux64GccDPOpt/Newtonian.o -L/home/ahajisha/OpenFOAM/OpenFOAM-1.5/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/viscosityModel.o: In function `Foam::fvPatchField<Foam::SymmTensor<double> >::type() const':
viscosityModel.C:(.text._ZNK4Foam12fvPatchFieldINS _10SymmTensorIdEEE4typeEv[Foam::fvPatchField<Foam::SymmTensor<double> >::type() const]+0x3): undefined reference to `Foam::fvPatchField<Foam::SymmTensor<double> >::typeName'
Make/linux64GccDPOpt/viscosityModel.o: In function `Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh>::type() const':
collect2: ld returned 1 exit status
make: *** [OpenFOAM.out] Error 1

I would be very grateful if anyone can lead me to the source of the error.

Thanks alot,

mattijs October 27, 2009 13:01

Probably you want to build a library, not an executable. Use 'wmake libso' to build a library. This is not a bug.

ICL October 27, 2009 13:05

I compiled the new viscosity model with wmake and I used to compile it with wmake every time I changed it. This time I only changed a constant value in it and got the above-mentioned error using wmake! I don`t know what is the reason...

ICL October 27, 2009 13:07

I typed wmake in src/transportModels/incompressible by the way. As I mentioned it was fine using wmake for that before.

ICL October 30, 2009 07:44

First of all, that was not a bug ( Sorry for that)
Use of wmake is possible for executable files such as Solvers. There is a library specified to transportmodels/incompressible and that should be updated using wmake libso incompressible in src/transportmodels directory.

All times are GMT -4. The time now is 12:19.