Porting C++ code to new compiler and OS 
Author Message
 Porting C++ code to new compiler and OS

I am attempting to port some in-house C++ code from
        C++ compiler version 2.1.1 to version 4.0
        IRIX OS version 4.0.1 to 5.3
        Motif 1.1 to Motif 1.2
        X11R4 to X11R5

and, I am having some strange errors that no one has been able to solve.
These are the errors I get when I build under the new versions:

        CC -c <filname> -o <filname>.o -non_shared  -G 5  -DSYSV  -DCC_3_0  -I<include directories>   -I<include directories>
"/usr/include/X11/Xfuncproto.h", line 43: error(3151): this operator is not
          allowed in a preprocessing expression
  #if __STDC__ || defined(__cplusplus) || defined(c_plusplus) || (FUNCPROTO&2)
                                                                           ^

"/usr/include/X11/Xfuncproto.h", line 53: error(3151): this operator is not
          allowed in a preprocessing expression
  #if __STDC__ || defined(__cplusplus) || defined(c_plusplus) || (FUNCPROTO&8)
                                                                           ^

"/usr/include/X11/Xfuncproto.h", line 61: error(3151): this operator is not
          allowed in a preprocessing expression
  #if __STDC__ || defined(__cplusplus) || defined(c_plusplus) || (FUNCPROTO&4)
                                                                           ^

Any info or ideas will be helpful.

Thanks,

Nicole.



Sun, 14 Dec 1997 03:00:00 GMT  
 Porting C++ code to new compiler and OS
Nicole, my email to you still bounces.  You need to define FUNCPROTO to be
some
integer value, like 0.  For C++ it doesn't matter what value you choose,
but
just #define FUNCPROTO
makes it a blank, which causes the error with the '&' operator.  I'll
forward
this to the custodians of the header file to make them aware of the
incompatiblity.


Mon, 15 Dec 1997 03:00:00 GMT  
 Porting C++ code to new compiler and OS

Quote:
(Nicole LaFontaine) writes:

|> I am attempting to port some in-house C++ code from
|>   C++ compiler version 2.1.1 to version 4.0
|>   IRIX OS version 4.0.1 to 5.3
|>   Motif 1.1 to Motif 1.2
|>   X11R4 to X11R5
|>
|> and, I am having some strange errors that no one has been able to solve.
|> |> These are the errors I get when I build under the new versions:
|>
|>         CC -c <filname> -o <filname>.o -non_shared  -G 5  -DSYSV
|> -DCC_3_0  -I<include directories>   -I<include directories>
|> "/usr/include/X11/Xfuncproto.h", line 43: error(3151): this operator is
|> not
|>           allowed in a preprocessing expression
|>   #if __STDC__ || defined(__cplusplus) || defined(c_plusplus) ||
|> (FUNCPROTO&2)
|>                                                                        
|> ^
|>
|> "/usr/include/X11/Xfuncproto.h", line 53: error(3151): this operator is
|> not
|>           allowed in a preprocessing expression
|>   #if __STDC__ || defined(__cplusplus) || defined(c_plusplus) ||
|> (FUNCPROTO&8)
|>                                                                        
|> ^
|>
|> "/usr/include/X11/Xfuncproto.h", line 61: error(3151): this operator is
|> not
|>           allowed in a preprocessing expression
|>   #if __STDC__ || defined(__cplusplus) || defined(c_plusplus) ||
|> (FUNCPROTO&4)
|>                                                                        
|> ^
|>
|

I have tried to reply by email, but without success.  Could you send me a
self-contained example illustrating this problem?



Mon, 15 Dec 1997 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Problems Porting clcc code from sun/os to solaris

2. Porting MFC code to OS/2

3. Questions about compilers and executable formats for a new OS

4. help porting source code between Borland and Watcom compilers

5. Porting code from 16-bit to 32-bit compiler

6. C++ code : Visual C++ and Borland C++ compilers

7. C++ code : Visual C++ and Borland C++ compilers

8. C/C++ Compiler for Mac OS 7.6

9. Free OS/2 c or c++ compiler

10. Porting C++ code from VC6 to .NET: linker issues

11. Porting C++ Varargs into C code

12. porting VB code to C++

 

 
Powered by phpBB® Forum Software