Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7440625
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:52:49+00:00 2026-05-29T10:52:49+00:00

I have a very simple print program called print.c: #include <stdio.h> int main(void){ printf(Random

  • 0

I have a very simple print program called “print.c”:

#include <stdio.h>

int main(void){
        printf("Random words");
}

Compiling with the command gcc -o print print.c causes a completely clean compile and the executable runs as expected.

Compiling with the command gcc -o -std=c99 print print.c gives me:

print: In function `_fini':
(.fini+0x0): multiple definition of `_fini'
/usr/lib/gcc/i686-linux-gnu/4.6.1/../../../i386-linux-gnu/crti.o:(.fini+0x0): first defined here
print: In function `__data_start':
(.data+0x0): multiple definition of `__data_start'
/usr/lib/gcc/i686-linux-gnu/4.6.1/../../../i386-linux-gnu/crt1.o:(.data+0x0): first defined here
print: In function `__data_start':
(.data+0x4): multiple definition of `__dso_handle'
/usr/lib/gcc/i686-linux-gnu/4.6.1/crtbegin.o:(.data+0x0): first defined here
print:(.rodata+0x4): multiple definition of `_IO_stdin_used'
/usr/lib/gcc/i686-linux-gnu/4.6.1/../../../i386-linux-gnu/crt1.o:(.rodata.cst4+0x0): first defined here
print: In function `_start':
(.text+0x0): multiple definition of `_start'
/usr/lib/gcc/i686-linux-gnu/4.6.1/../../../i386-linux-gnu/crt1.o:(.text+0x0): first defined here
print:(.rodata+0x0): multiple definition of `_fp_hw'
/usr/lib/gcc/i686-linux-gnu/4.6.1/../../../i386-linux-gnu/crt1.o:(.rodata+0x0): first defined here
print: In function `_init':
(.init+0x0): multiple definition of `_init'
/usr/lib/gcc/i686-linux-gnu/4.6.1/../../../i386-linux-gnu/crti.o:(.init+0x0): first defined here
/tmp/ccfvqWMW.o: In function `main':
print.c:(.text+0x0): multiple definition of `main'
print:(.text+0xb4): first defined here
/usr/lib/gcc/i686-linux-gnu/4.6.1/crtend.o:(.dtors+0x0): multiple definition of `__DTOR_END__'
print:(.dtors+0x4): first defined here
/usr/bin/ld: error in print(.eh_frame); no .eh_frame_hdr table will be created.
collect2: ld returned 1 exit status

Does anyone know how to fix this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T10:52:50+00:00Added an answer on May 29, 2026 at 10:52 am

    Your print isn’t being interpreted as the argument to the -o option, so it’s trying to relink your print executable from the first compilation. This includes numerous symbols that duplicate other symbols it’s trying to link, hence the errors.

    Try instead:

    gcc -std=c99 -o print print.c
    

    or better yet:

    gcc -std=c99 -Wall -g -O -o print print.c
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very simple C++ application. #include <stdio.h> #include <iostream> int main(int argc,
I am having a very strange problem in a simple program and have been
Let's suppose I have a very simple Ruby program: require 'rubygems' require 'ruby-debug' x
I have a very simple program but this is giving me a seg fault.
I have a very very simple program that parses a csv file that has
I have a very simple WCF program where I have a simple self-host and
i have a very simple animation in flash CS4. My image travels from point
i have very simple problem. I need to create model, that represent element of
I have very simple select like this: SELECT * FROM table WHERE column1 IN
I have very simple window where I have 2 buttons - one for cancel,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.