cannot compile same code on RHL 7.2 and 9.0

Discussion in 'C Programming' started by Slavisa, Aug 11, 2003.

  1. Slavisa

    Slavisa Guest

    When I make my program on RedHat 9.0 everything goes fine, but when I try to
    make on Red Hat 7.2 I get following errors:


    logic2_msgcln.c:178: warning: initialization makes integer from pointer
    without a cast
    logic2_msgcln.c:178: initializer element is not constant
    logic2_msgcln.c:178: warning: data definition has no type or storage class
    logic2_msgcln.c:185: parse error before `void'
    logic2_msgcln.c:225: parse error before `('
    logic2_msgcln.c:225: warning: type defaults to `int' in declaration of
    `__result'
    logic2_msgcln.c:225: warning: data definition has no type or storage class
    logic2_msgcln.c:225: parse error before `}'
    logic2_msgcln.c:225: conflicting declarations of `__result'
    logic2_msgcln.c:225: `__result' previously declared here
    logic2_msgcln.c:225: `l' undeclared here (not in a function)
    logic2_msgcln.c:225: `__s2' undeclared here (not in a function)
    logic2_msgcln.c:225: parse error before `if'
    logic2_msgcln.c:225: warning: type defaults to `int' in declaration of
    `__result'
    logic2_msgcln.c:225: conflicting declarations of `__result'
    logic2_msgcln.c:225: `__result' previously defined here
    logic2_msgcln.c:225: warning: data definition has no type or storage class
    logic2_msgcln.c:225: parse error before `}'
    logic2_msgcln.c:225: warning: type defaults to `int' in declaration of
    `__result'
    logic2_msgcln.c:225: warning: data definition has no type or storage class
    logic2_msgcln.c:225: parse error before `}'
    logic2_msgcln.c:225: redefinition of `__result'
    logic2_msgcln.c:225: `__result' previously defined here
    logic2_msgcln.c:225: `__s1' undeclared here (not in a function)
    logic2_msgcln.c:225: warning: passing arg 1 of `l_object_get_type' makes
    pointer from integer without a cast
    logic2_msgcln.c:225: parse error before `if'
    logic2_msgcln.c:225: warning: type defaults to `int' in declaration of
    `__result'
    logic2_msgcln.c:225: conflicting declarations of `__result'
    logic2_msgcln.c:225: `__result' previously defined here
    logic2_msgcln.c:225: warning: data definition has no type or storage class
    logic2_msgcln.c:225: parse error before `}'



    The thing is that I don't have `__result' in my code nor `__s1' etc.
    This is what I have on RedHat 9.0:
    compat-gcc-7.3-2.96.118
    gcc-g77-3.2.2-5
    libgcc-3.2.2-5
    compat-gcc-c++-7.3-2.96.118
    gcc-gnat-3.2.2-5
    gcc-3.2.2-5
    gcc-c++-3.2.2-5
    gcc-java-3.2.2-5


    glib-1.2.10-10
    glibc-2.3.2-11.9
    glib2-devel-2.2.1-1
    glibc-kernheaders-2.4-8.10
    glib-devel-1.2.10-10
    glibc-common-2.3.2-11.9
    glib2-2.2.1-1
    glibc-devel-2.3.2-11.9


    ... and on Red Hat 7.2 :
    gcc-2.96-112.7.2
    gcc-g77-2.96-112.7.2
    gcc-c++-2.96-112.7.2


    glib10-1.0.6-10
    glib-devel-1.2.10-5
    glibc-devel-2.2.4-32
    glib-1.2.10-5
    compat-glibc-6.2-2.1.3.2
    glib2-2.0.6-2
    glib2-devel-2.0.6-2
    glibc-common-2.2.4-32
    glibc-2.2.4-32


    Installing newer version of gcc is excluded. Any suggestions ?
     
    Slavisa, Aug 11, 2003
    #1
    1. Advertising

  2. Slavisa

    Derk Gwen Guest

    "Slavisa" <> wrote:
    # When I make my program on RedHat 9.0 everything goes fine, but when I try to
    # make on Red Hat 7.2 I get following errors:

    Do you have a header file that ends in something like
    #endif
    without a new line after the #endif or some other final preprocessor command?

    --
    Derk Gwen http://derkgwen.250free.com/html/index.html
    Who's leading this mob?
     
    Derk Gwen, Aug 11, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Derk Gwen
    Replies:
    1
    Views:
    328
    Joona I Palaste
    Aug 19, 2003
  2. =?ISO-8859-1?Q?Martin_J=F8rgensen?=

    cannot compile the following example code (person-pointer)

    =?ISO-8859-1?Q?Martin_J=F8rgensen?=, Mar 25, 2006, in forum: C++
    Replies:
    26
    Views:
    663
    Alex Buell
    Mar 31, 2006
  3. Nagaraj
    Replies:
    1
    Views:
    889
    Lionel B
    Mar 1, 2007
  4. fAnSKyer
    Replies:
    2
    Views:
    547
    Alf P. Steinbach
    Jun 7, 2009
  5. bluebaron
    Replies:
    3
    Views:
    766
    Jonathan N. Little
    Nov 4, 2009
Loading...

Share This Page