When i compile i have Undefined reference to 'main' in file crt0.o (function _exit)
What's wrong ??? I checked my c file and there is a main function
Undefined reference to 'main'
-
- Posts: 564
- Joined: Sat Jan 17, 2004 10:22 am
- Location: Sweden
- Contact:
Yesterday night i made it working but i unfortunately i deleted my directory :S
Here ismy makefile :
include $(PS2SDK)/Makefile.eeglobal
EE_NAME = ps2shell
EE_C = $(EE_NAME).c
EE_O = $(EE_NAME).o
EE_ELF = $(EE_NAME).elf
EE_INCS += -I$(PS2SDK)/ee/rpc/keyboard/include
EE_LIB += -L$(PS2SDK)/ee/rpc/keyboard/lib
EE_LIBS += -lkbd
all: $(EE_O)
ee-g++ $(EE_FLAGS) $(EE_INCS) $(EE_LIB) -o $(EE_ELF) $(EE_OBJS) $(EE_LIBS)
$(EE_O): $(EE_C)
ee-g++ $(EE_FLAGS) $(EE_INCS) $(EE_LIB) -c $(EE_C)
clean:
rm *.elf *.o
and here is the Makefile.eeglobal from ps2sdk ( i modified it)
EE_INCS = -I$(PS2DEV)/ee/ee/include -I$(PS2SDK)/ee/kernel/include -I$(PS2SDK)/ee/libc/include -I$(PS2SDK)/common/include -I$(PS2DEV)/ee/ee/include -Iinclude -I$(PS2SDK)/ee/debug/include
EE_LIB = -L$(PS2SDK)/ee/libc/lib -L$(PS2SDK)/ee/debug/lib -L$(PS2SDK)/ee/kernel/lib -L$(PS2DEV)/ee/ee/lib
EE_LIBS = -lc -lkernel -ldebug -lsyscall
EE_FLAGS = -nostartfiles -T$(PS2SDK)/ee/startup/linkfile -D_EE -O2 -G0 -Wall
EE_OBJS = $(PS2SDK)/ee/startup/obj/crt0.o $(PS2SDK)/ee/libc/obj/vsnprintf.o $(PS2SDK)/ee/libc/obj/sbrk.o $(PS2SDK)/ee/libc/obj/putchar.o $(PS2SDK)/ee/libc/obj/memcpy.o $(PS2SDK)/ee/libc/obj/strncpy.o
Here ismy makefile :
include $(PS2SDK)/Makefile.eeglobal
EE_NAME = ps2shell
EE_C = $(EE_NAME).c
EE_O = $(EE_NAME).o
EE_ELF = $(EE_NAME).elf
EE_INCS += -I$(PS2SDK)/ee/rpc/keyboard/include
EE_LIB += -L$(PS2SDK)/ee/rpc/keyboard/lib
EE_LIBS += -lkbd
all: $(EE_O)
ee-g++ $(EE_FLAGS) $(EE_INCS) $(EE_LIB) -o $(EE_ELF) $(EE_OBJS) $(EE_LIBS)
$(EE_O): $(EE_C)
ee-g++ $(EE_FLAGS) $(EE_INCS) $(EE_LIB) -c $(EE_C)
clean:
rm *.elf *.o
and here is the Makefile.eeglobal from ps2sdk ( i modified it)
EE_INCS = -I$(PS2DEV)/ee/ee/include -I$(PS2SDK)/ee/kernel/include -I$(PS2SDK)/ee/libc/include -I$(PS2SDK)/common/include -I$(PS2DEV)/ee/ee/include -Iinclude -I$(PS2SDK)/ee/debug/include
EE_LIB = -L$(PS2SDK)/ee/libc/lib -L$(PS2SDK)/ee/debug/lib -L$(PS2SDK)/ee/kernel/lib -L$(PS2DEV)/ee/ee/lib
EE_LIBS = -lc -lkernel -ldebug -lsyscall
EE_FLAGS = -nostartfiles -T$(PS2SDK)/ee/startup/linkfile -D_EE -O2 -G0 -Wall
EE_OBJS = $(PS2SDK)/ee/startup/obj/crt0.o $(PS2SDK)/ee/libc/obj/vsnprintf.o $(PS2SDK)/ee/libc/obj/sbrk.o $(PS2SDK)/ee/libc/obj/putchar.o $(PS2SDK)/ee/libc/obj/memcpy.o $(PS2SDK)/ee/libc/obj/strncpy.o
-
- Posts: 564
- Joined: Sat Jan 17, 2004 10:22 am
- Location: Sweden
- Contact: