Cannot compile a simple program using wmake #234
Replies: 5 comments
-
|
I tested that with BlueCFD 2017-2: /home/ofuser/blueCFD/OpenFOAM-5.x/src/OpenFOAM/containers/Lists/PackedList/PackedListI.T.Htemplate<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 wmakeBut |
Beta Was this translation helpful? Give feedback.
-
|
@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: OpenFOAM/OpenFOAM-5.x@bfe333f#diff-d3623e9d3148435270bc6f13c36a205d As for the command: @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: It should tell you this information: |
Beta Was this translation helpful? Give feedback.
-
|
@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. |
Beta Was this translation helpful? Give feedback.
-
|
@wyldckat $ 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. |
Beta Was this translation helpful? Give feedback.
-
|
@wyldckat |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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:
Beta Was this translation helpful? Give feedback.
All reactions