|
[Sponsors] |
February 1, 2024, 16:23 |
Problem with compilation wmake
|
#1 |
New Member
Oscar Zagal
Join Date: Jan 2024
Posts: 15
Rep Power: 2 |
Hi everyone
I´m trying to create another equation of state model based on Bussinesq, but when i write "wmake" the next set of errors and warnings are printed in the terminal of OF4Win 20.09: wmakeLnInclude: linking include files to ./lnInclude Making dependency list for source file rhoCCP11.C x86_64-w64-mingw32-g++ -m64 -std=c++11 -Dcygwin64 -DWM_ARCH_OPTION=64 -DWM_DP -WM_LABEL_SIZE=32 -DMSWIN -DLITTLE_ENDIAN -DMSWIN -DLITTLE_ENDIAN -Wall -Wextra Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof O3 -DNoRepository -ftemplate-depth-100 -I/opt/OpenFOAM/OpenFOAM-dev/src/thermohysicalModels/specie/lnInclude -IlnInclude -I. -I/opt/OpenFOAM/OpenFOAM-dev/srcOpenFOAM/lnInclude -I/opt/OpenFOAM/OpenFOAM-dev/src/OSspecific/MSWindows/lnInclde -c rhoCCP11.C -o Make/cygwin64mingw-w64DPInt32Opt/rhoCCP11.o In file included from rhoCCP11.H:241, from rhoCCP11.C:26: rhoCCP11.C: In constructor ‘Foam::rhoCCP11<Specie>::rhoCCP11(const Foam::dictioary&)’: rhoCCP11.C:38:9: warning: invalid use of incomplete type ‘const class Foam::dicionary’ 38 | a0_(dict.subDict("equationOfState").lookup<scalar> ("a0")), | ^~~~ In file included from /opt/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/db/error/error.H:1, from /opt/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/autoPtr.H:26, from /opt/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/autoPtrH:148, from rhoCCP11.H:47, from rhoCCP11.C:26: /opt/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/db/error/messageStream.H:63:7: note: foward declaration of ‘class Foam::dictionary’ 63 | class dictionary; | ^~~~~~~~~~ In file included from rhoCCP11.H:241, from rhoCCP11.C:26: rhoCCP11.C:38:54: error: expected primary-expression before ‘>’ token 38 | a0_(dict.subDict("equationOfState").lookup<scalar> ("a0")), | ^ rhoCCP11.C:39:9: warning: invalid use of incomplete type ‘const class Foam::dicionary’ 39 | a1_(dict.subDict("equationOfState").lookup<scalar> ("a1")), | ^~~~ In file included from /opt/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/db/error/error.H:1, from /opt/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/autoPtr.H:26, from /opt/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/autoPtrH:148, from rhoCCP11.H:47, from rhoCCP11.C:26: /opt/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/db/error/messageStream.H:63:7: note: foward declaration of ‘class Foam::dictionary’ 63 | class dictionary; | ^~~~~~~~~~ In file included from rhoCCP11.H:241, from rhoCCP11.C:26: rhoCCP11.C:39:54: error: expected primary-expression before ‘>’ token 39 | a1_(dict.subDict("equationOfState").lookup<scalar> ("a1")), | ^ rhoCCP11.C:40:9: warning: invalid use of incomplete type ‘const class Foam::dicionary’ 40 | a2_(dict.subDict("equationOfState").lookup<scalar> ("a2")) | ^~~~ In file included from /opt/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/db/error/error.H:1, from /opt/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/autoPtr.H:26, from /opt/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/autoPtrH:148, from rhoCCP11.H:47, from rhoCCP11.C:26: /opt/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/db/error/messageStream.H:63:7: note: foward declaration of ‘class Foam::dictionary’ 63 | class dictionary; | ^~~~~~~~~~ In file included from rhoCCP11.H:241, from rhoCCP11.C:26: rhoCCP11.C:40:54: error: expected primary-expression before ‘>’ token 40 | a2_(dict.subDict("equationOfState").lookup<scalar> ("a2")) | ^ rhoCCP11.C: In member function ‘void Foam::rhoCCP11<Specie>::write(Foam::Ostrea&) const’: rhoCCP11.C:50:16: error: ‘dict’ has incomplete type 50 | dictionary dict("equationOfState"); | ^~~~ In file included from /opt/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/db/error/error.H:1, from /opt/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/autoPtr.H:26, from /opt/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/autoPtrH:148, from rhoCCP11.H:47, from rhoCCP11.C:26: /opt/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/db/error/messageStream.H:63:7: note: foward declaration of ‘class Foam::dictionary’ 63 | class dictionary; | ^~~~~~~~~~ In file included from rhoCCP11.H:241, from rhoCCP11.C:26: rhoCCP11.C:50:16: error: ‘dict’ has incomplete type 50 | dictionary dict("equationOfState"); | ^~~~ In file included from /opt/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/db/error/error.H:1, from /opt/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/autoPtr.H:26, from /opt/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/autoPtrH:148, from rhoCCP11.H:47, from rhoCCP11.C:26: /opt/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/db/error/messageStream.H:63:7: note: foward declaration of ‘class Foam::dictionary’ 63 | class dictionary; | ^~~~~~~~~~ In file included from rhoCCP11.H:241, from rhoCCP11.C:26: rhoCCP11.C:50:16: error: ‘dict’ has incomplete type 50 | dictionary dict("equationOfState"); | ^~~~ In file included from /opt/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/db/error/error.H:1, from /opt/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/autoPtr.H:26, from /opt/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/autoPtrH:148, from rhoCCP11.H:47, from rhoCCP11.C:26: /opt/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/db/error/messageStream.H:63:7: note: foward declaration of ‘class Foam::dictionary’ 63 | class dictionary; | ^~~~~~~~~~ In file included from rhoCCP11.H:241, from rhoCCP11.C:26: rhoCCP11.C:50:16: error: ‘dict’ has incomplete type 50 | dictionary dict("equationOfState"); | ^~~~ In file included from /opt/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/db/error/error.H:1, from /opt/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/autoPtr.H:26, from /opt/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/autoPtrH:148, from rhoCCP11.H:47, from rhoCCP11.C:26: /opt/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/db/error/messageStream.H:63:7: note: foward declaration of ‘class Foam::dictionary’ 63 | class dictionary; | ^~~~~~~~~~ rhoCCP11.C: At global scope: rhoCCP11.C:32:1: error: redefinition of ‘Foam::rhoCCP11<Specie>::rhoCCP11(constFoam::dicti onary&)’ 32 | Foam::rhoCCP11<Specie>::rhoCCP11 | ^~~~ In file included from rhoCCP11.H:241, from rhoCCP11.C:26: rhoCCP11.C:32:1: note: ‘Foam::rhoCCP11<Specie>::rhoCCP11(const Foam::dictionary)’ previously declared here 32 | Foam::rhoCCP11<Specie>::rhoCCP11 | ^~~~ rhoCCP11.C:47:6: error: redefinition of ‘void Foam::rhoCCP11<Specie>::write(Foa::Ostream&) const’ 47 | void Foam::rhoCCP11<Specie>::write(Ostream& os) const | ^~~~ In file included from rhoCCP11.H:241, from rhoCCP11.C:26: rhoCCP11.C:47:6: note: ‘void Foam::rhoCCP11<Specie>::write(Foam::Ostream&) cons’ previously declared here 47 | void Foam::rhoCCP11<Specie>::write(Ostream& os) const | ^~~~ rhoCCP11.C:62:16: error: redefinition of ‘template<class Specie> Foam::Ostream&Foam:perator<<(Foam::Ostream&, const Foam::rhoCCP11<Specie>&)’ 62 | Foam::Ostream& Foam:perator<< | ^~~~ In file included from rhoCCP11.H:241, from rhoCCP11.C:26: rhoCCP11.C:62:16: note: ‘template<class Specie> Foam::Ostream& Foam:perator<<Foam::Ostream&, const Foam::rhoCCP11<Specie>&)’ previously declared here 62 | Foam::Ostream& Foam:perator<< | ^~~~ make: *** [/opt/OpenFOAM/OpenFOAM-dev/wmake/rules/General/transform:26: Make/cywin64mingw-w64DPInt32Opt/rhoCCP11.o] Error 1 Can you please give me some help with this problem? Thanks in advance |
|
February 2, 2024, 16:51 |
|
#2 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,695
Rep Power: 40 |
It means that the header (included or otherwise) only know about the existence of the "dictionary" class, but don't know about any of its methods etc. This means that your .C file should also have this in it:
Code:
#include "dictionary.H" https://develop.openfoam.com/Develop...-compile-mingw |
|
February 2, 2024, 20:51 |
|
#3 |
New Member
Oscar Zagal
Join Date: Jan 2024
Posts: 15
Rep Power: 2 |
Thanks for answer Mark, after i did what you suggest the terminal show me this:
wmakeLnInclude: linking include files to ./lnInclude Making dependency list for source file rhoCCP11.C x86_64-w64-mingw32-g++ -m64 -std=c++11 -Dcygwin64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -DMSWIN -DLITTLE_ENDIAN -DMSWIN -DLITTLE_ENDIAN -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3 -DNoRepository -ftemplate-depth-100 -I/opt/OpenFOAM/OpenFOAM-dev/src/transportModels/compressible/lnInclude -I/opt/OpenFOAM/OpenFOAM-dev/src/thermophysicalModels/specie/lnInclude -I/opt/OpenFOAM/OpenFOAM-dev/src/thermophysicalModels/thermophysicalProperties/lnInclude -I/opt/OpenFOAM/OpenFOAM-dev/src/finiteVolume/lnInclude -I/opt/OpenFOAM/OpenFOAM-dev/src/meshTools/lnInclude -IlnInclude -I. -I/opt/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude -I/opt/OpenFOAM/OpenFOAM-dev/src/OSspecific/MSWindows/lnInclude -c rhoCCP11.C -o /opt/OpenFOAM/OpenFOAM-dev/platforms/cygwin64mingw-w64DPInt32Opt/cygdrive/c/OpenFOAM/20.09/cygwin64/src/thermophysicalModels/specie/equationOfState/rhoCCP11/rhoCCP11.o rhoCCP11.C:33:1: error: redefinition of ‘Foam::rhoCCP11<Specie>::rhoCCP11(const Foam::dictionary&)’ 33 | Foam::rhoCCP11<Specie>::rhoCCP11 | ^~~~ In file included from rhoCCP11.H:241, from rhoCCP11.C:26: rhoCCP11.C:33:1: note: ‘Foam::rhoCCP11<Specie>::rhoCCP11(const Foam::dictionary&)’ previously declared here 33 | Foam::rhoCCP11<Specie>::rhoCCP11 | ^~~~ rhoCCP11.C:48:6: error: redefinition of ‘void Foam::rhoCCP11<Specie>::write(Foam::Ostream&) const’ 48 | void Foam::rhoCCP11<Specie>::write(Ostream& os) const | ^~~~ In file included from rhoCCP11.H:241, from rhoCCP11.C:26: rhoCCP11.C:48:6: note: ‘void Foam::rhoCCP11<Specie>::write(Foam::Ostream&) const’ previously declared here 48 | void Foam::rhoCCP11<Specie>::write(Ostream& os) const | ^~~~ rhoCCP11.C:63:16: error: redefinition of ‘template<class Specie> Foam::Ostream& Foam:perator<<(Foam::Ostream&, const Foam::rhoCCP11<Specie>&)’ 63 | Foam::Ostream& Foam:perator<< | ^~~~ In file included from rhoCCP11.H:241, from rhoCCP11.C:26: rhoCCP11.C:63:16: note: ‘template<class Specie> Foam::Ostream& Foam:perator<<(Foam::Ostream&, const Foam::rhoCCP11<Specie>&)’ previously declared here 63 | Foam::Ostream& Foam:perator<< | ^~~~ make: *** [/opt/OpenFOAM/OpenFOAM-dev/wmake/rules/General/transform:26: /opt/OpenFOAM/OpenFOAM-dev/platforms/cygwin64mingw-w64DPInt32Opt/cygdrive/c/OpenFOAM/20.09/cygwin64/src/thermophysicalModels/specie/equationOfState/rhoCCP11/rhoCCP11.o] Error 1 And i dont understand too much what you mentioned about cross-compiled, im a begginer in OpenFoam and OOP programming, could you please explain me a little more? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] swak4foam openfoam 7 installation problem | Andrea23 | OpenFOAM Community Contributions | 1 | February 17, 2020 18:11 |
wmake problem: "sudo: wmake: command not found" | Luiggito | OpenFOAM Programming & Development | 1 | January 11, 2015 13:48 |
compiling firefoam | Farshad_Noravesh | OpenFOAM | 27 | December 24, 2012 04:21 |
Problems about compiling OF1.5.x on Bluegene/P | ywang | OpenFOAM | 1 | August 25, 2011 05:22 |
OpenFoam 1.6-ext - error ./Allwmake in /src | preibie | OpenFOAM Installation | 14 | June 14, 2011 05:57 |