Linux下make 无法引用main,求解决
[root@localhost code]# make
gcc -I. -I/home/ACE_wrappers -g -o transfer -L/home/ACE_wrappers/ace -lACE -lpthread -lrt -ldl -lz
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../crt1.o(.text+0x18): In function `_start':
../sysdeps/i386/elf/start.S:77: undefined reference to `main'
collect2: ld returned 1 exit status
这是Makefile文件内容
LIPRAN_SOURCES=Main.cpp# This file may be used as an input for make(3)# Remove the lines below to convert it into a pure .am fileTARGET = transferCFLAGS += -I.CFLAGS += -I$(ACE_ROOT)CFLAGS += -g LIBS += -L$(ACE_ROOT)/ace -lACE -lpthread -lrt -ldl -lzOBJS=${IPRAN_SOURCES:.cpp=.o} all: $(TARGET)$(TARGET): ${OBJS} gcc $(CFLAGS) -o $(TARGET) ${OBJS} $(LIBS).SUFFIXES:.SUFFIXES: .cpp .o.cpp.o: gcc $(CFLAGS) -o $@ -c $<clean: rm -f $(TARGET) rm -f $(OBJS)#include "ServerService.h"#include "Msgs_Task.h"#include "Listofport.h"#include "log.h"Listofport lists;log logger;ACE_INET_Addr TCP_sen_port;void app_shutdown();int ACE_TMAIN (int, ACE_TCHAR *[]){ if(logger.open() == -1) return -1; ACE_Sig_Adapter sa((ACE_Sig_Handler_Ex)app_shutdown); ACE_Sig_Set sig_set; sig_set.sig_add (SIGINT); sig_set.sig_add (SIGQUIT);