Let's say I have this code:
Code: Select all
void handleJoyEvent(u16 joy, u16 changed, u16 state);
u8 readVDP60hz()
{
return (*((u16*)(0xC00004)))&0x1;
};
int main()
{
// [...]
JOY_setEventHandler(handleJoyEvent);
// [...]
}
//no declaration of handleJoyEvent follows
Code: Select all
C:/sgdk/lib/libmd.a(main.o): In function `readVDP60hz':
main.c:(.text+0x178): multiple definition of `readVDP60hz'
out/src/main.o:main.c:(.text+0xf8): first defined here
C:/sgdk/lib/libmd.a(main.o): In function `main':
main.c:(.text+0x184): multiple definition of `main'
out/src/main.o:main.c:(.text+0x104): first defined here
C:/sgdk/bin/ld: Warning: size of symbol `main' changed from 232 in out/src/main.
o to 330 in C:/sgdk/lib/libmd.a(main.o)
make: *** [out/rom.out] Error 1
Does someone know why that is? Might this be due to my makefile or is this unavoidable?