Hi everyone,
I am trying to upgrade my build to 4.18 from 4.17 and encountered the following issue. The system is a CentOS 7 with gcc 4.8.5. I tried intel compilers 2016 and 2018, both producing the same error.
I didn't recall any similiar problems before with 4.17. However since the code that refused to compile has changed in 4.18, previous experience doesn't help I guess. I reused the compiled external packages from 4.17 for what it's worth.
Any help is appreciated.
Best regards,
Wade
CXX classes/gauss/libISSMCore_la-GaussPenta.lo
CXX classes/libISSMCore_la-IoModel.lo
CXX classes/libISSMCore_la-FemModel.lo
./classes/IoModel.cpp(1702): error: reference variable "object" requires an initializer
for(Object* & object : elements->objects){
^
./classes/IoModel.cpp(1702): error: expected a ";"
for(Object* & object : elements->objects){
^
./classes/IoModel.cpp(1702): error: expected an expression
for(Object* & object : elements->objects){
^
./classes/IoModel.cpp(1702): error: expected a ";"
for(Object* & object : elements->objects){
^
./classes/IoModel.cpp(1723): error: reference variable "object" requires an initializer
for(Object* & object : elements->objects){
^
./classes/IoModel.cpp(1723): error: expected a ";"
for(Object* & object : elements->objects){
^
./classes/IoModel.cpp(1723): error: expected an expression
for(Object* & object : elements->objects){
^
./classes/IoModel.cpp(1723): error: expected a ";"
for(Object* & object : elements->objects){
void IoModel::FetchDataToInput(Inputs2* inputs2,Elements* elements,const char* vector_name,int input_enum,IssmDouble default_value){/{{{/
/*First, look whether it is not already loaded in this->data*/
vector<IoData*>::iterator iter;
for(iter=data.begin();iter<data.end();iter++){
IoData* iodata=*iter;
if(strcmp(iodata->name,vector_name)==0){
_assert_(iodata->code==7);
for(int i=0;i<elements->Size();i++){
Element* element=xDynamicCast<Element*>(elements->GetObjectByOffset(i));
element->InputCreate(iodata->data,inputs2,this,iodata->M,iodata->N,iodata->layout,input_enum,iodata->code);//we need i to index into elements.
}
return;
}
}