All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shriramana Sharma <samjnaa@gmail.com>
To: Linux C Programming List <linux-c-programming@vger.kernel.org>
Subject: Compile error caused by case of filename extension
Date: Sat, 25 Mar 2006 13:33:49 +0530	[thread overview]
Message-ID: <200603251333.50127.samjnaa@gmail.com> (raw)

When the contents of TESTING.C are:

#include "stdio.h"
void main(void)
{
	printf("\n%d\n", ( -0.25 < 0) ? 2 : 4);
}

Upon trying to compile:

$ gcc -o TESTING TESTING.C
TESTING.C:3: error: ‘::main’ must return ‘int’

Then I changed the file to:

#include "stdio.h"
int main(void)
{
	printf("\n%d\n", ( -0.25 < 0) ? 2 : 4);
	return 1;
}

Then I got:

$ gcc -o TESTING TESTING.C
/tmp/ccEnQk4o.o:(.eh_frame+0x11): undefined reference to 
`__gxx_personality_v0'
collect2: ld returned 1 exit status

But if I change the input file name extension to testing.c or even TESTING.c 
(small letters) no problems were got. Why is this?

-- 

Tux #395953 resides at http://samvit.org
playing with KDE 3.51 on SUSE Linux 10.0
$ date [] CCE +2006-03-25 W12-6 UTC+0530
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2006-03-25  8:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-25  8:03 Shriramana Sharma [this message]
2006-03-25  8:35 ` Compile error caused by case of filename extension B S Srinidhi
2006-03-28  6:26   ` Markus Rechberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200603251333.50127.samjnaa@gmail.com \
    --to=samjnaa@gmail.com \
    --cc=linux-c-programming@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.