help... crt1.o "undefinied reference to main is _start"

help... crt1.o "undefinied reference to main is _start"

Post by Joe Ciarc » Mon, 28 Jul 1997 04:00:00


I have the SWiM release of Motif which I'm trying to install however when I
try to make mwm I get an error telling me that there's an undefined
reference to main in crt1.o. I did a little bit of searching and I've
discovered that other people have had the same problem while trying to
compile other programs too. For the record I have Slackware 3.2 and SWiM
version 2. It's been a while since I've played with Linux but at one point
(about 2 years ago) I did have SWiM working just fine. I was going to
replace crt1.o with an older version from a previous release of slackware
but I can't figure out where to get it from (everything is compressed and I
can't easily find out what's in those files). Does anyone know which tar.gz
file crt1.o lives in (or does anyone else have a solution to this problem)?
I would greatly appreciate any help you can offer. Thanks, Joe


        When the only tool you have is a hammer,
        everything begins to look like a nail.

        -Lotfi Zadeh

 email:  analog at thecia dot net

Any commercial or private email messages not related to music, pro-audio,
or computer programming will be considered as unsolicited. Your postmaster
WILL be notified.


1. Porting to Linux: crt1.o and "undefined reference to `main'"

I am presently working on a port of a program
from Solaris to Linux, Debian version 2.0.

When compiling a number of object files to create a .so
file as follows:

     gcc -o ./obj/ obj/clAuth.o obj/clConnect.o
          obj/clExec.o obj/clMisc.o obj/clStub.o obj/srb_perror.o
          obj/dllist.o obj/clGlobal.o

I get the message:

     /usr/lib/crt1.o(.text+0x36): undefined reference to `main'
     collect2: ld returned 1 exit status

Can someone indicate how I solve this problem?

Thank you for your time,

Josef Jurek

2. sb64pci

3. "increased VM size+Main-memory" better than "Main-memory+Hard-disk" ??

4. Programming interface to qdaemon?

5. GETSERVBYNAME()????????????????????"""""""""""""

6. Think Different.

7. """"""""My SoundBlast 16 pnp isn't up yet""""""""""""

8. Ftp Kills my port, any ideas why?

9. Ethernet HOWTO reference to "pl12" and "pl13"

10. Type "(", ")" and "{", "}" in X...

11. /usr/lib/crt1.o(.text+0x69): undefined reference to `main'

12. "umsdos" vs "vfat" vs "looped ext2"

13. Problems compiling with gcc- "ld: cannot open crt1.o: No such file or directory"