Menu

#10 RX320 won't make on SuSE 10.0

v1.0_(example)
open
5
2006-04-06
2006-04-06
Phil C.
No

'rx320' won't make (compile) on newer versions of
c++/gcc. Abbreviated error message is...

pac@suse:~/rx320-0.6.1> make
c++ `xc-config --cflags` -g -c main.cc
main.cc: In constructor ‘OXMain::OXMain(const
OXWindow*, int, int)’:
main.cc:317: error: ‘max’ was not declared in this scope
make: *** [main.o] Error 1
pac@suse:~/rx320-0.6.1>

Here are some additional details.
gcc/c++: 4.0.2 20050901 (prerelease) (SUSE Linux)
Target: x86_64-suse-linux (10.0)
processor: AMD Sempron-64 3400+
kernel: 2.6.13-15.8-default
xclass: xclass-0.9.1-5 (x86_64)
make: GNU Make 3.80

If I fix this instance, another pops up at line 329,
and then another, and another, etc., ad nauseum. The
identical 'Makefile' works fine under SUSE Linux 9.3; I
have a dual-boot system with both 9.3 and 10.0. I
believe the error is due to the increased anality built
into the newer compiler(s).

Discussion

  • Ken Prox

    Ken Prox - 2006-04-08

    Logged In: YES
    user_id=318943

    See the patches section for this project.

    [ 1466916 ] Fix extra qualification error with gcc 4.1.0

    Does that fix the problem?

     
  • Robert Turnbull

    Robert Turnbull - 2006-10-02

    Logged In: YES
    user_id=866622

    I had the same problem under Suse 9.3. (possibly my compiler
    has been updated?) I seem to have fixed it by replacing all
    instances of max(x,y) with x>?y and replacing all instances
    of min(x,y) with x<?y. Also I found a call to SetViewMode in
    OxFreqDB with three parameters SetViewMode(LV_DETAILS, True,
    True) where only one was allowed. I dropped the last two
    parameters (just a guess....) Anyway I now have RX320
    compiled and working.

     
  • Robert Turnbull

    Robert Turnbull - 2007-02-24

    Logged In: YES
    user_id=866622
    Originator: NO

    With SUSE 10.2 I'm still getting the error when compiling the unmodified version:

    main.cc: In constructor ‘OXMain::OXMain(const OXWindow*, int, int)’:
    main.cc:317: error: ‘max’ was not declared in this scope

    Adding -fpermissive to CCFLAGS per the patch did not help.

    I tried adding my own min and max definitions but this broke other things.

     
  • Ken Prox

    Ken Prox - 2007-02-26

    Logged In: YES
    user_id=318943
    Originator: NO

    circlotron,

    What version of gcc do you have?

     
  • Robert Turnbull

    Robert Turnbull - 2007-02-26

    Logged In: YES
    user_id=866622
    Originator: NO

    I'm using gcc 4.1.3-29.

     

Log in to post a comment.