Mailinglist Archive: opensuse (4547 mails)

< Previous Next >
Odd Behaviour:compiling with no `main` function: Suse 7.3 Prof
  • From: J Can <james_cdl@xxxxxxxxxxx>
  • Date: Thu, 27 May 2004 22:16:51 +0100 (BST)
  • Message-id: <20040527211651.95902.qmail@xxxxxxxxxxxxxxxxxxxxxxx>
Hi Susers,

Odd results when trying to complie a C program with no
'main' function.

I compile a simple C program with no main function
like so:

james@linux:~/usp> gcc -o checkpass checkpass.c
/usr/lib/crt1.o: In function `_start':
/usr/lib/crt1.o(.text+0x18): undefined reference to
collect2: ld returned 1 exit status

The odd thing is programs with main defined are ok.

I've googled the problem but seemed to get loads of
results with people posting a similar problem (but no
clear solution)

I am using:
Kernel: Linux linux 2.4.10-4GB #1 Fri Sep 28 17:20:21
GMT 2001 i686 unknown
gcc:gcc version 2.95.3 20010315 (SuSE)

I guess the solution would be to go through a series
of upgrades (gcc, lib, kernel), but would be grateful
for a `pointer` in the right direction.

Many thanks,


Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now

< Previous Next >