Closed ethren closed 2 years ago
I tested that with BlueCFD 2017-2: I commented the line 550 in
/home/ofuser/blueCFD/OpenFOAM-5.x/src/OpenFOAM/containers/Lists/PackedList/PackedListI.T.H
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; // commented this line <<< This is the line 550
}
Now I could compile your program using wmake
:
wmake
But wmake exe
fails!
PS: The function above in OpenFOAM7 doesn't contain the line return *this
@s1291 Many thanks for pointing that out, that is indeed a bug in the OpenFOAM 5.x we provide in blueCFD-Core 2017-2, which has already been fixed in the most recent 5.x repository, as reported here: https://github.com/OpenFOAM/OpenFOAM-5.x/commit/bfe333ff64a8838ddff768cd717f14fad69b7b49#diff-d3623e9d3148435270bc6f13c36a205d
As for the command: wmake exe
- this will not work on Windows, since this was designed for creating a stand-alone executable, namely one that does not depend on other libraries. Please use wmake
without the exe
option.
@ethren Did you do any updates to the MSys2 installation that is provided with blueCFD-Core 2017-2? I ask this because the build error you are getting seems to be associated to using a more recent GCC version. If you run:
gcc --version
g++ --version
It should tell you this information:
gcc.exe (Rev1, Built by MSYS2 project) 7.2.0
...
G__~1.EXE (Rev1, Built by MSYS2 project) 7.2.0
@ethren I was intrigued about this and have tested building your application and it builds perfectly fine with blueCFD-Core 2017-2.
Please provide more details about your installation, because it is not using the standard installation which we provide.
@wyldckat Sorry, I forgot to mention that I am using a more recent version of GCC (version 9.2):
$ gcc --version
gcc.exe (Rev2, Built by MSYS2 project) 9.2.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ g++ --version
G__~1.EXE (Rev2, Built by MSYS2 project) 9.2.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
But Now it works perfectly after removing that line from the file.
@wyldckat Thank you for the info!
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:
The path of current directory and its length:
But Unfortunately, the compilation fails when I run
wmake
. Here is the log file: log.logThank 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: