Opened 3 years ago

Closed 3 years ago

#693 closed defect (fixed)

C++ examples fail to compile

Reported by: dmisev Owned by: fxavier
Priority: major Milestone: 9.0.x
Component: manuals_and_examples Version: development
Keywords: Cc:
Complexity: Medium


manuals_and_examples/examples/c++$ make
g++ -DHAVE_CONFIG_H -I. -I../../..    -w  -fPIC  -I /usr/include/  -g3 -gdwarf-2 -O0 -rdynamic  -I/home/dimitar/projects/rasdaman/community/src -I/home/dimitar/projects/rasdaman/community/src/debug -I/home/dimitar/projects/rasdaman/community/src/include  -DLINUX -DEARLY_TEMPLATE -DONCRPC -DDEBUG  -fPIC  -I /usr/include/  -g3 -gdwarf-2 -O0 -rdynamic  -I/home/dimitar/projects/rasdaman/community/src -I/home/dimitar/projects/rasdaman/community/src/debug -I/home/dimitar/projects/rasdaman/community/src/include  -DSHARE_DATA_DIR=\"/home/dimitar/projects/rasdaman/community/install/share/rasdaman/\" -DCONFDIR=\"/home/dimitar/projects/rasdaman/community/install/etc/\" -DBINDIR=\"/home/dimitar/projects/rasdaman/community/install/bin/\" -DLOGDIR=\"/home/dimitar/projects/rasdaman/community/install/log/\" -MT insertppm.o -MD -MP -MF .deps/insertppm.Tpo -c -o insertppm.o In function ‘int main(int, char**)’: error: call of overloaded ‘r_Sinterval(int&, r_Range)’ is ambiguous note: candidates are:
In file included from ../../../raslib/minterval.hh:57:0,
                 from ../../../raslib/,
                 from ../../../raslib/dlist.hh:37,
                 from ../../../raslib/template_inst.hh:33,
../../../raslib/sinterval.hh:252:5: note: r_Sinterval::r_Sinterval(char, char)
../../../raslib/sinterval.hh:250:5: note: r_Sinterval::r_Sinterval(r_Range, char)
../../../raslib/sinterval.hh:248:5: note: r_Sinterval::r_Sinterval(char, r_Range)
../../../raslib/sinterval.hh:243:5: note: r_Sinterval::r_Sinterval(r_Range, r_Range)
make: *** [insertppm.o] Error 1

Change History (2)

comment:1 Changed 3 years ago by fxavier

While doing make, that error pops up in this line:

cacheDom = r_Minterval(2)

<< r_Sinterval((r_Range)0, imgCols - 1)
<< r_Sinterval(k, k + min(tileRows-1, imgRows-k-1));

It is complaining about not knowing which function to use, and the problem can be solved with a cast, in the same manner that was done in the second row:

cacheDom = r_Minterval(2)

<< r_Sinterval((r_Range)0, imgCols - 1)
<< r_Sinterval((r_Range)k, k + min(tileRows-1, imgRows-k-1));

comment:2 Changed 3 years ago by fxavier

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.