Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error: unknown type 'uint' #3

Open
multiplemonomials opened this issue May 7, 2018 · 1 comment
Open

Build error: unknown type 'uint' #3

multiplemonomials opened this issue May 7, 2018 · 1 comment

Comments

@multiplemonomials
Copy link

multiplemonomials commented May 7, 2018

I get this error when building with both OS X and Windows (MinGW):

[ 52%] Built target Rocprop
[ 52%] Building Fortran object RocfluidMP/Rocflo/CMakeFiles/Rocflo.dir/RFLO_C2eAvgCoeffs.F90.o
In file included from /Volumes/Storage/rocstar/ROcstar/Rocmop/src/Rocmop_1.C:46:0:
/Volumes/Storage/rocstar/ROcstar/Rocmop/include/MesqPane_95.h:526:25: error: expected ')' before 'size'
   MyEntityIterator(uint size){ _cur = 1; _size = size;}
                         ^~~~
/Volumes/Storage/rocstar/ROcstar/Rocmop/include/MesqPane_95.h:562:3: error: 'uint' does not name a type; did you mean 'rint'?
   uint  _cur; // The current node's position.
   ^~~~
   rint
/Volumes/Storage/rocstar/ROcstar/Rocmop/include/MesqPane_95.h:563:3: error: 'uint' does not name a type; did you mean 'rint'?
   uint  _size;// The size of the element array
   ^~~~
   rint
/Volumes/Storage/rocstar/ROcstar/Rocmop/include/MesqPane_95.h: In destructor 'virtual Mesquite::MyEntityIterator::~MyEntityIterator()':
/Volumes/Storage/rocstar/ROcstar/Rocmop/include/MesqPane_95.h:530:4: error: '_cur' was not declared in this scope
   {_cur = 0;
    ^~~~
/Volumes/Storage/rocstar/ROcstar/Rocmop/include/MesqPane_95.h:531:5: error: '_size' was not declared in this scope
     _size = 0;
     ^~~~~
/Volumes/Storage/rocstar/ROcstar/Rocmop/include/MesqPane_95.h: In member function 'virtual void Mesquite::MyEntityIterator::restart()':
/Volumes/Storage/rocstar/ROcstar/Rocmop/include/MesqPane_95.h:536:5: error: '_cur' was not declared in this scope
     _cur = 1;
     ^~~~
/Volumes/Storage/rocstar/ROcstar/Rocmop/include/MesqPane_95.h: In member function 'virtual void* Mesquite::MyEntityIterator::operator*() const':
/Volumes/Storage/rocstar/ROcstar/Rocmop/include/MesqPane_95.h:541:9: error: '_cur' was not declared in this scope
     if (_cur > _size)
         ^~~~
/Volumes/Storage/rocstar/ROcstar/Rocmop/include/MesqPane_95.h:541:16: error: '_size' was not declared in this scope
     if (_cur > _size)
                ^~~~~
/Volumes/Storage/rocstar/ROcstar/Rocmop/include/MesqPane_95.h: In member function 'virtual void Mesquite::MyEntityIterator::operator++()':
/Volumes/Storage/rocstar/ROcstar/Rocmop/include/MesqPane_95.h:549:5: error: '_cur' was not declared in this scope
     _cur ++;
     ^~~~
/Volumes/Storage/rocstar/ROcstar/Rocmop/include/MesqPane_95.h: In member function 'virtual bool Mesquite::MyEntityIterator::is_at_end() const':
/Volumes/Storage/rocstar/ROcstar/Rocmop/include/MesqPane_95.h:558:9: error: '_cur' was not declared in this scope
     if (_cur <= _size) return 0;
         ^~~~
/Volumes/Storage/rocstar/ROcstar/Rocmop/include/MesqPane_95.h:558:17: error: '_size' was not declared in this scope
     if (_cur <= _size) return 0;
                 ^~~~~
/Volumes/Storage/rocstar/ROcstar/Rocmop/src/Rocmop_1.C: In member function 'void MOP::Rocmop::perturb_stationary()':
/Volumes/Storage/rocstar/ROcstar/Rocmop/src/Rocmop_1.C:1726:6: error: 'uint' was not declared in this scope
  for(uint k=0, nk=elist.size(); k<nk; ++k){
      ^~~~
/Volumes/Storage/rocstar/ROcstar/Rocmop/src/Rocmop_1.C:1726:6: note: suggested alternative: 'rint'
  for(uint k=0, nk=elist.size(); k<nk; ++k){
      ^~~~
      rint
/Volumes/Storage/rocstar/ROcstar/Rocmop/src/Rocmop_1.C:1726:33: error: 'k' was not declared in this scope
  for(uint k=0, nk=elist.size(); k<nk; ++k){
                                 ^
/Volumes/Storage/rocstar/ROcstar/Rocmop/src/Rocmop_1.C:1726:35: error: 'nk' was not declared in this scope
  for(uint k=0, nk=elist.size(); k<nk; ++k){
                                   ^~
/Volumes/Storage/rocstar/ROcstar/Rocmop/src/Rocmop_1.C:1726:35: note: suggested alternative: 'nj'
  for(uint k=0, nk=elist.size(); k<nk; ++k){
                                   ^~
                                   nj

It looks like several files try to use some sort of 'uint' type, but that isn't in the standard library so the build dies. I was able to fix it by replacing all instances of uint with unsigned int:

find Rocmop -name '*.C' -exec sed -i '' -e 's/uint/unsigned int/g' {} \;
@metorm
Copy link

metorm commented May 7, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants