Hello,
I am aware that we have to follow the following instructions: https://github.com/blueCFD/Core/wiki/Quick-notes-on-how-to-update-build#work-environment-for-bluecfd-core-2016-2-and-2017 when trying to compile a source code program. I have also went through the FAQ. But unfortunately I couldn't compile a simple program in BlueCFD 2017.
Here is my program gradTest.C:
#include "fvCFD.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "createTime.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< nl << "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
Info<< "End\n" << endl;
return 0;
}
// ************************************************************************* //
Here is my setup:
$ cat Make/files
gradTest.C
EXE = ./gradTest
$ cat Make/options
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lmeshTools
The path of current directory and its length:
$ pwd
/x/ofuser-of5/run/programming/gradTest
$ pwd | wc -c
39
But Unfortunately, the compilation fails when I run wmake. Here is the log file:
log.log
Thank you
EDIT
After reading carefully the log file I found the following error:
C:/MICROS~1/OpenFOAM-5.x/src/OpenFOAM/containers/Lists/PackedList/PackedListI.T.H:550:13: error: return-statement with a value, in function returning 'void' [-fpermissive]
I opened the file at that location:
notepad2 /home/ofuser/blueCFD/OpenFOAM-5.x/src/OpenFOAM/containers/Lists/PackedList/PackedListI.T.H
I found the following function:
template<unsigned nBits>
inline void Foam::PackedList<nBits>::const_iterator::operator=
(
const iteratorBase& iter
)
{
this->list_ = iter.list_;
this->index_ = iter.index_;
// Avoid going past end()
// eg, iter = iterator(list, Inf)
if (this->index_ > this->list_->size_)
{
this->index_ = this->list_->size_;
}
return *this; // <<<<<<<< Is it a bug?
}
Hello,
I am aware that we have to follow the following instructions: https://github.com/blueCFD/Core/wiki/Quick-notes-on-how-to-update-build#work-environment-for-bluecfd-core-2016-2-and-2017 when trying to compile a source code program. I have also went through the FAQ. But unfortunately I couldn't compile a simple program in BlueCFD 2017.
Here is my program
gradTest.C:Here is my setup:
$ cat Make/files gradTest.C EXE = ./gradTest $ cat Make/options EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude EXE_LIBS = \ -lfiniteVolume \ -lmeshToolsThe path of current directory and its length:
But Unfortunately, the compilation fails when I run
wmake. Here is the log file:log.log
Thank you
EDIT
After reading carefully the log file I found the following error:
C:/MICROS~1/OpenFOAM-5.x/src/OpenFOAM/containers/Lists/PackedList/PackedListI.T.H:550:13: error: return-statement with a value, in function returning 'void' [-fpermissive]I opened the file at that location:
I found the following function: