Find the answer to your Linux question:
Results 1 to 4 of 4
GCC is giving me awkward messages when I try to compile any program, regardless of how simple. For example: ================================= gcc -o mkdir.c mkdir collect2: ld terminated with signal 11 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2004
    Posts
    1

    GCC acting weird


    GCC is giving me awkward messages when I try to compile any program, regardless of how simple. For example:
    =================================
    gcc -o mkdir.c mkdir
    collect2: ld terminated with signal 11 [Segmentation fault]
    mkdir(.rodata+0x0): multiple definition of `_fp_hw'
    /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../crt1.o(.rodata+0x0): first def
    ined here
    mkdir(.data+0x4): In function `__data_start':
    : multiple definition of `__dso_handle'
    /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/crtbegin.o(.data+0x0): first defined he
    re
    mkdir(.init+0x0): In function `_init':
    : multiple definition of `_init'
    /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../crti.o(.init+0x0): first defin
    ed here
    mkdir(.text+0x0): In function `_start':
    : multiple definition of `_start'
    /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../crt1.o(.text+0x0): first defin
    ed here
    mkdir(.fini+0x0): In function `_fini':
    : multiple definition of `_fini'
    /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../crti.o(.fini+0x0): first defin ed here
    mkdir(.got.plt+0x0): multiple definition of `_GLOBAL_OFFSET_TABLE_'
    /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../crt1.o(.got.plt+0x0): first de fined here
    mkdir(.rodata+0x4): multiple definition of `_IO_stdin_used'
    /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../crt1.o(.rodata+0x4): first def ined here
    mkdir(.data+0x0): In function `__data_start':
    : multiple definition of `__data_start'
    /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../crt1.o(.data+0x0): first defin ed here
    /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../crt1.o(.dynamic+0x0): multiple definition of `_DYNAMIC'
    mkdir(.dynamic+0x0): first defined here


    Any help would be appreciated

  2. #2
    Just Joined!
    Join Date
    Jul 2004
    Location
    Seattle, WA or Lewisburg, PA. Depending on time of year.
    Posts
    37
    Well, from what i see right now,
    gcc -o mkdir.c mkdir
    is the wrong syntax I believe. I think that what you would be doing there is outputting to mkdir.c and trying to use mkdir as your file. Which I assume is not what you want.

    If you just typed that in wrong, then problems with "first defined here" is usually a linking error I believe. Of course, I've only encountered it with linking several files and libraries together, and it was an object file redifinition error.

    Not much help, I would say check your syntax on the command line first.

    ~tk[/quote]

  3. #3
    Linux User
    Join Date
    Jul 2004
    Posts
    256
    it's supposed to be
    Code:
    c
    gcc -o output input.c
    c++
    g++ -o output input.cpp
    --monkey

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Oct 2011
    Posts
    1

    Simple typ0 here

    what I had been doing was typing the -o option with -zero or - or -0, so make sure you're using the right option, oh, instead of zero.

    easy.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •