Stephane-D / SGDK

SGDK - A free and open development kit for the Sega Mega Drive
https://www.patreon.com/SGDK
MIT License
1.75k stars 187 forks source link

main error compiling #149

Closed molo32 closed 4 years ago

molo32 commented 4 years ago
C:/SGDK/bin/mkdir -p src/boot
C:/SGDK/bin/mkdir -p out
C:/SGDK/bin/mkdir -p out/src
C:/SGDK/bin/mkdir -p out/res
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/
SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a
-time -fomit-frame-pointer -flto -c main.c -o out/main.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/
SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a
-time -fomit-frame-pointer -flto -c src/main.c -o out/src/main.o
  "out/res/gfx.o out/res/sound.o out/res/sprite.o out/main.o out/src/main.o"
echo > out/cmd_
C:/SGDK/bin/gcc -BC:/SGDK/bin -n -T C:/SGDK/md.ld -nostdlib out/sega.o @out/cmd_
 C:/SGDK/lib/libmd.a C:/SGDK/lib/libgcc.a -o out/rom.out
out/src/main.o (symbol from plugin): In function `main':
(.text+0x0): multiple definition of `main'
out/main.o (symbol from plugin):(.text+0x0): first defined here
make: *** [out/rom.out] Error 1
molo32 commented 4 years ago

I solved it, the problem was that I had two main.c files.