Porting from AIX 4.3.3 /xlc to gcc /usr/lib/crt1.o error

Jeff CTR Vandenbussche Jeff.CTR.Vandenbussche@tc.faa.gov
Thu Dec 20 07:45:00 GMT 2001


     I am trying to port a small simple Makefile from AIX 4.3.3 xlc 
     compiler to the gcc compiler on either Redhat 6.0(gcc 2.91), 6.2(gcc 
     2.91) or 7.2 (gcc 2.96).  When it attempts to compile I get the 
     following error:
     
     /usr/lib/crt1.o(.text+0x18): undefined reference to `main'
     collect2: ld returned 1 exit status
     
     Here is the Makefile in question:
     
     CFLAGS=-c -bstatic -qlanglvl=noansifor -qonce -qnooptimize 
     -qstaticinline -qidirfirst -g
     
     nsm2d : UDP_SocketMgr.o nsm_clientserver.o nsm_client.o nsm_server.o 
     nsm2d.o
             xlC -o nsm2d nsm2d.o UDP_SocketMgr.o  nsm_clientserver.o 
     nsm_client.o ns
     m_server.o
     
     UDP_SocketMgr.o : UDP_SocketMgr.C UDP_SocketMgr.h
             xlC $(CFLAGS) UDP_SocketMgr.C
     
     nsm_clientserver.o : nsm_clientserver.C nsm_clientserver.h
             xlC $(CFLAGS) nsm_clientserver.C
     
     nsm_client.o : nsm_client.C nsm_clientserver.h
             xlC $(CFLAGS) nsm_client.C
     
     nsm_server.o : nsm_server.C nsm_clientserver.h
             xlC $(CFLAGS) nsm_server.C
     
     Can anyone please give me some suggestions as to why I am getting 
     these errors.  
     
     Thanks,
     
     Jeff



More information about the Gcc-help mailing list