|
[Sponsors] |
April 8, 2022, 08:29 |
Missing file or directory
|
#1 |
Member
hari charan
Join Date: Sep 2021
Location: India,hyderabad
Posts: 97
Rep Power: 5 |
Hello guys,
I had my own modified library called myIncompressibleTwoPhaseMixture in user directory. But I couldn't use myIncompressibleTwoPhaseMixture.H in myImmiscibleIncompressibleTwoPhaseMixture.H . I am getting this error Code:
hari@hari:~/OpenFOAM/hari-8/src/twoPhaseModels/myImmiscibleIncompressibleTwoPhaseMixture$ wmake libso wmake libso . wmakeLnInclude: linking include files to ./lnInclude Making dependency list for source file myImmiscibleIncompressibleTwoPhaseMixture.C could not open file myIncompressibleTwoPhaseMixture.H for source file myImmiscibleIncompressibleTwoPhaseMixture.C due to No such file or directory g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam8/src/transportModels/lnInclude -I/opt/openfoam8/src/twoPhaseModels/incompressibleTwoPhaseMixture/lnInclude -I/opt/openfoam8/src/twoPhaseModels/twoPhaseMixture/lnInclude -I/opt/openfoam8/src/twoPhaseModels/interfaceProperties/lnInclude -I/opt/openfoam8/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam8/src/OpenFOAM/lnInclude -I/opt/openfoam8/src/OSspecific/POSIX/lnInclude -fPIC -c myImmiscibleIncompressibleTwoPhaseMixture.C -o Make/linux64GccDPInt32Opt/myImmiscibleIncompressibleTwoPhaseMixture.o In file included from myImmiscibleIncompressibleTwoPhaseMixture.C:26: myImmiscibleIncompressibleTwoPhaseMixture.H:38:10: fatal error: myIncompressibleTwoPhaseMixture.H: No such file or directory 38 | #include "myIncompressibleTwoPhaseMixture.H" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make: *** [/opt/openfoam8/wmake/rules/General/transform:26: Make/linux64GccDPInt32Opt/myImmiscibleIncompressibleTwoPhaseMixture.o] Error 1 I know it's some kind of linking error. I am attaching the Make/options of myImmiscibleIncompressibleTwoPhaseMixture library Code:
EXE_INC = \ -I$(LIB_SRC)/transportModels/lnInclude \ -I$(WM_PROJECT_DIR)/src/twoPhaseModels/myIncompressibleTwoPhaseMixture/lnInclude \ -I$(LIB_SRC)/twoPhaseModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/twoPhaseModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude LIB_LIBS = \ -L$(FOAM_USER_LIBBIN) \ -lmyIncompressibleTwoPhaseMixture \ -ltwoPhaseMixture \ -lmyIncompressibleTransportModels \ -linterfaceProperties \ -ltwoPhaseProperties \ -lfiniteVolume I am using openfoam version 8 Thanks in advance |
|
July 17, 2023, 08:58 |
|
#2 | |
New Member
Join Date: Jun 2023
Posts: 10
Rep Power: 3 |
Quote:
|
||
July 17, 2023, 11:44 |
|
#3 |
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17 |
Hello!
Hier is an example that works right. https://openfoamwiki.net/index.php/H...ure_to_icoFoam Just follow the steps and see what is missing. Regards Peter |
|
July 18, 2023, 04:55 |
|
#4 |
New Member
Join Date: Jun 2023
Posts: 10
Rep Power: 3 |
Thank you Peter! I followed the tutorial at the link
Adding the Energy Equation to interFoam (OF 2.4.0) but I have a problem compiling the libraries for the src folder. At the link you shared with me, they didn't modify the src files actually, so I don't understand which is the exact way to follow. |
|
July 18, 2023, 18:48 |
|
#5 |
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17 |
Making dependency list for source file myImmiscibleIncompressibleTwoPhaseMixture.C
could not open file myIncompressibleTwoPhaseMixture.H Are you sure, that the file and its directory are accessable? The error does not say, that the file is not found, but could not be open... Change the accessability using chmod, for the file and the folder(s) above it. Or try to use sudo to run as admin. |
|
July 19, 2023, 04:28 |
|
#6 |
New Member
Join Date: Jun 2023
Posts: 10
Rep Power: 3 |
The error I get is different actually, I paste here the output of my terminal. It is something about the file viscosityModelNew.C that I didn't modify at all...
b0628063b03e: incompressible>> wmake libso wmake libso . wmakeLnIncludeAll: running wmakeLnInclude on dependent libraries: wmakeLnInclude: linking include files to ../twoPhaseMixture//lnInclude wmakeLnInclude: linking include files to ./lnInclude Making dependency list for source file myIncompressibleTwoPhaseMixture.C Making dependency list for source file singlePhaseTransportModel.C Making dependency list for source file transportModel.C Making dependency list for source file Arrheniuss.C Making dependency list for source file strainRateFunction.C Making dependency list for source file Casson.C Making dependency list for source file HerschelBulkley.C Making dependency list for source file BirdCarreau.C Making dependency list for source file CrossPowerLaw.C Making dependency list for source file powerLaw.C Making dependency list for source file Newtonian.C Making dependency list for source file viscosityModelNew.C Making dependency list for source file viscosityModel.C g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3 -DNoRepository -ftemplate-depth-100 -I.. -I../twoPhaseMixture/lnInclude -I/opt/openfoam8/src/finiteVolume/lnInclude -I/opt/openfoam8/src/meshTools/lnInclude -IlnInclude -I. -I/opt/openfoam8/src/OpenFOAM/lnInclude -I/opt/openfoam8/src/OSspecific/POSIX/lnInclude -fPIC -c viscosityModels/viscosityModel/viscosityModel.C -o Make/linux64GccDPInt32Opt/viscosityModels/viscosityModel/viscosityModel.o g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3 -DNoRepository -ftemplate-depth-100 -I.. -I../twoPhaseMixture/lnInclude -I/opt/openfoam8/src/finiteVolume/lnInclude -I/opt/openfoam8/src/meshTools/lnInclude -IlnInclude -I. -I/opt/openfoam8/src/OpenFOAM/lnInclude -I/opt/openfoam8/src/OSspecific/POSIX/lnInclude -fPIC -c viscosityModels/viscosityModel/viscosityModelNew.C -o Make/linux64GccDPInt32Opt/viscosityModels/viscosityModel/viscosityModelNew.o viscosityModels/viscosityModel/viscosityModelNew.C: In static member function 'static Foam::autoPtr<Foam::viscosityModel> Foam::viscosityModel::New(const Foam::word&, const Foam::dictionary&, const volVectorField&, const surfaceScalarField&)': viscosityModels/viscosityModel/viscosityModelNew.C:43:31: error: 'const class Foam::dictionary' has no member named 'get'; did you mean 'set'? 43 | const word modelType(dict.get<word>("transportModel")); | ^~~ | set viscosityModels/viscosityModel/viscosityModelNew.C:43:39: error: expected primary-expression before '>' token 43 | const word modelType(dict.get<word>("transportModel")); | ^ viscosityModels/viscosityModel/viscosityModelNew.C:47:57: error: no matching function for call to 'Foam::HashTable<Foam::autoPtr<Foam::viscosityMode l> (*)(const Foam::word&, const Foam::dictionary&, const Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>&, const Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&), Foam::word, Foam::string::hash>::HashTable(const Foam::word&)' 47 | auto* ctorPtr = dictionaryConstructorTable(modelType); | ^ In file included from /opt/openfoam8/src/OpenFOAM/lnInclude/Istream.H:187, from /opt/openfoam8/src/OpenFOAM/lnInclude/token.H:495, from /opt/openfoam8/src/OpenFOAM/lnInclude/UILListIO.C:28, from /opt/openfoam8/src/OpenFOAM/lnInclude/UILList.C:105, from /opt/openfoam8/src/OpenFOAM/lnInclude/UILList.H:390, from /opt/openfoam8/src/OpenFOAM/lnInclude/ILList.H:39, from /opt/openfoam8/src/OpenFOAM/lnInclude/IDLList.H:35, from /opt/openfoam8/src/OpenFOAM/lnInclude/entry.H:45, from /opt/openfoam8/src/OpenFOAM/lnInclude/dictionary.H:53, from viscosityModels/viscosityModel/viscosityModel.H:53, from viscosityModels/viscosityModel/viscosityModelNew.C:29: /opt/openfoam8/src/OpenFOAM/lnInclude/HashTable.C:83:1: note: candidate: 'Foam::HashTable<T, Key, Hash>::HashTable(std::initializer_list<Foam::Tuple 2<Key, T> >) [with T = Foam::autoPtr<Foam::viscosityModel> (*)(const Foam::word&, const Foam::dictionary&, const Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>&, const Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&); Key = Foam::word; Hash = Foam::string::hash]' 83 | Foam::HashTable<T, Key, Hash>::HashTable | ^~~~ /opt/openfoam8/src/OpenFOAM/lnInclude/HashTable.C:85:43: note: no known conversion for argument 1 from 'const Foam::word' to 'std::initializer_list<Foam::Tuple2<Foam::word, Foam::autoPtr<Foam::viscosityModel> (*)(const Foam::word&, const Foam::dictionary&, const Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>&, const Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&)> >' 85 | std::initializer_list<Tuple2<Key, T>> lst | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ /opt/openfoam8/src/OpenFOAM/lnInclude/HashTable.C:68:1: note: candidate: 'Foam::HashTable<T, Key, Hash>::HashTable(Foam::HashTable<T, Key, Hash>&&) [with T = Foam::autoPtr<Foam::viscosityModel> (*)(const Foam::word&, const Foam::dictionary&, const Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>&, const Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&); Key = Foam::word; Hash = Foam::string::hash]' 68 | Foam::HashTable<T, Key, Hash>::HashTable | ^~~~ /opt/openfoam8/src/OpenFOAM/lnInclude/HashTable.C:70:31: note: no known conversion for argument 1 from 'const Foam::word' to 'Foam::HashTable<Foam::autoPtr<Foam::viscosityMode l> (*)(const Foam::word&, const Foam::dictionary&, const Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>&, const Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&), Foam::word, Foam::string::hash>&&' 70 | HashTable<T, Key, Hash>&& ht | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~ /opt/openfoam8/src/OpenFOAM/lnInclude/HashTable.C:56:1: note: candidate: 'Foam::HashTable<T, Key, Hash>::HashTable(const Foam::HashTable<T, Key, Hash>&) [with T = Foam::autoPtr<Foam::viscosityModel> (*)(const Foam::word&, const Foam::dictionary&, const Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>&, const Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&); Key = Foam::word; Hash = Foam::string::hash]' 56 | Foam::HashTable<T, Key, Hash>::HashTable(const HashTable<T, Key, Hash>& ht) | ^~~~ /opt/openfoam8/src/OpenFOAM/lnInclude/HashTable.C:56:73: note: no known conversion for argument 1 from 'const Foam::word' to 'const Foam::HashTable<Foam::autoPtr<Foam::viscosityModel > (*)(const Foam::word&, const Foam::dictionary&, const Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>&, const Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&), Foam::word, Foam::string::hash>&' 56 | Foam::HashTable<T, Key, Hash>::HashTable(const HashTable<T, Key, Hash>& ht) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ In file included from /opt/openfoam8/src/OpenFOAM/lnInclude/HashTable.C:645, from /opt/openfoam8/src/OpenFOAM/lnInclude/Istream.H:187, from /opt/openfoam8/src/OpenFOAM/lnInclude/token.H:495, from /opt/openfoam8/src/OpenFOAM/lnInclude/UILListIO.C:28, from /opt/openfoam8/src/OpenFOAM/lnInclude/UILList.C:105, from /opt/openfoam8/src/OpenFOAM/lnInclude/UILList.H:390, from /opt/openfoam8/src/OpenFOAM/lnInclude/ILList.H:39, from /opt/openfoam8/src/OpenFOAM/lnInclude/IDLList.H:35, from /opt/openfoam8/src/OpenFOAM/lnInclude/entry.H:45, from /opt/openfoam8/src/OpenFOAM/lnInclude/dictionary.H:53, from viscosityModels/viscosityModel/viscosityModel.H:53, from viscosityModels/viscosityModel/viscosityModelNew.C:29: /opt/openfoam8/src/OpenFOAM/lnInclude/HashTableIO.C:33:1: note: candidate: 'Foam::HashTable<T, Key, Hash>::HashTable(Foam::Istream&, Foam::label) [with T = Foam::autoPtr<Foam::viscosityModel> (*)(const Foam::word&, const Foam::dictionary&, const Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>&, const Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&); Key = Foam::word; Hash = Foam::string::hash; Foam::label = int]' 33 | Foam::HashTable<T, Key, Hash>::HashTable(Istream& is, const label size) | ^~~~ /opt/openfoam8/src/OpenFOAM/lnInclude/HashTableIO.C:33:51: note: no known conversion for argument 1 from 'const Foam::word' to 'Foam::Istream&' 33 | Foam::HashTable<T, Key, Hash>::HashTable(Istream& is, const label size) | ~~~~~~~~~^~ In file included from /opt/openfoam8/src/OpenFOAM/lnInclude/Istream.H:187, from /opt/openfoam8/src/OpenFOAM/lnInclude/token.H:495, from /opt/openfoam8/src/OpenFOAM/lnInclude/UILListIO.C:28, from /opt/openfoam8/src/OpenFOAM/lnInclude/UILList.C:105, from /opt/openfoam8/src/OpenFOAM/lnInclude/UILList.H:390, from /opt/openfoam8/src/OpenFOAM/lnInclude/ILList.H:39, from /opt/openfoam8/src/OpenFOAM/lnInclude/IDLList.H:35, from /opt/openfoam8/src/OpenFOAM/lnInclude/entry.H:45, from /opt/openfoam8/src/OpenFOAM/lnInclude/dictionary.H:53, from viscosityModels/viscosityModel/viscosityModel.H:53, from viscosityModels/viscosityModel/viscosityModelNew.C:29: /opt/openfoam8/src/OpenFOAM/lnInclude/HashTable.C:36:1: note: candidate: 'Foam::HashTable<T, Key, Hash>::HashTable(Foam::label) [with T = Foam::autoPtr<Foam::viscosityModel> (*)(const Foam::word&, const Foam::dictionary&, const Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>&, const Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&); Key = Foam::word; Hash = Foam::string::hash; Foam::label = int]' 36 | Foam::HashTable<T, Key, Hash>::HashTable(const label size) | ^~~~ /opt/openfoam8/src/OpenFOAM/lnInclude/HashTable.C:36:54: note: no known conversion for argument 1 from 'const Foam::word' to 'Foam::label' {aka 'int'} 36 | Foam::HashTable<T, Key, Hash>::HashTable(const label size) | ~~~~~~~~~~~~^~~~ viscosityModels/viscosityModel/viscosityModelNew.C:51:9: error: 'FatalIOErrorInLookup' was not declared in this scope; did you mean 'FatalIOErrorIn'? 51 | FatalIOErrorInLookup | ^~~~~~~~~~~~~~~~~~~~ | FatalIOErrorIn make: *** [/opt/openfoam8/wmake/rules/General/transform:26: Make/linux64GccDPInt32Opt/viscosityModels/viscosityModel/viscosityModelNew.o] Error 1 b0628063b03e: incompressible>> |
|
Tags |
openfoam, openfoam8 |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[foam-extend.org] problem when installing foam-extend-1.6 | Thomas pan | OpenFOAM Installation | 7 | September 9, 2015 22:53 |
[swak4Foam] Problem installing swak_2.x for OpenFoam-2.4.0 | towanda | OpenFOAM Community Contributions | 6 | September 5, 2015 22:03 |
Trouble compiling utilities using source-built OpenFOAM | Artur | OpenFOAM Programming & Development | 14 | October 29, 2013 11:59 |
critical error during installation of openfoam | Fabio88 | OpenFOAM Installation | 21 | June 2, 2010 04:01 |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 20:08 |