I want to compile two files:
main.cpp with main.h
menu.cpp with menu.h
Of course, I've this at the beginning of main.cpp:
- Code: Select all
#include "main.h"
#include "menu.cpp"
and in my menu.cpp:
- Code: Select all
#include "menu.h"
I forgot to mention but I use the OSLib.
When I try to compile it, I get the following error:

I'm sure I've menu.h in the same directory.
Can someone help me ?
Is there a tool that build makefile automatically ?
EDIt: My heavily crappy makefile:
- Code: Select all
TARGET = BubbleStrugglePSP
OBJS = main.o menu.o
INCDIR =
CFLAGS = -G4 -Wall -O2
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LDFLAGS =
STDLIBS= -losl -lmikmod -lpng -lz \
-lpspsdk -lpspctrl -lpspumd -lpsprtc -lpsppower -lpspgu -lpspaudiolib -lpspaudio -lm
LIBS=$(STDLIBS)$(YOURLIBS)
menu.o: menu.cpp menu.h
main.o: main.c main.h
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = A remake of Bubble Struggle 2 on psp
PSP_FW_VERSION = 500
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak

