Hello!
I have this make file:
Code:
#===========================Basic Macros===========================#
COMPILER = gcc
INCLUDES = -IDependencies/SDL2-2.0.7/i686-w64-mingw32/include/SDL2 \
-IDependencies/SDL2_image-2.0.2/i686-w64-mingw32/include/SDL2 \
-IDependencies/SDL2_ttf-2.0.14/i686-w64-mingw32/include/SDL2 \
-IDependencies/SDL2_mixer-2.0.2/i686-w64-mingw32/include/SDL2
LIBRARIES = -LDependencies/SDL2-2.0.7/i686-w64-mingw32/lib \
-LDependencies/SDL2_image-2.0.2/i686-w64-mingw32/lib \
-LDependencies/SDL2_ttf-2.0.14/i686-w64-mingw32/lib \
-LDependencies/SDL2_mixer-2.0.2/i686-w64-mingw32/lib
CFLAGS = -g -Wall -c
LINKS = -lmingw32 -lSDL2main -lSDL2 -lSDL2_image -lSDL2_ttf -lSDL2_mixer
#===========================Basic Macros===========================#
#Objects.
OBJECTS = main.o Core.o Window.o Events.o
all: main.exe
#Linking Everything.
main.exe: $(OBJECTS)
$(COMPILER) $(LIBRARIES) -o main $(OBJECTS) $(LINKS)
#================================Compiling Source Files================================#
main.o: main.c TUC_Engine.h
$(COMPILER) $(INCLUDES) $(CFLAGS) main.c -o main.o
Core.o: Core.c Core.h
$(COMPILER) $(INCLUDES) $(CFLAGS) Core.c -o Core.o
Window.o: Window.c Window.h
$(COMPILER) $(INCLUDES) $(CFLAGS) Window.c -o Window.o
Events.o: Events.c Events.h
$(COMPILER) $(INCLUDES) $(CFLAGS) Events.c -o Events.o
#================================Compiling Source Files================================#
#Clean Rule.
#Remove .o and .exe files.
clean:
del *.o *.exe
When i run main with gdb i get this:
Code:
(gdb) b main
Breakpoint 1 at 0x404510
(gdb) r
Starting program: C:\Users\Popara\Documents\Programming\c\TUC_Engine/main.exe
[New Thread 5332.0x1024]
Breakpoint 1, 0x00404510 in main ()
(gdb) n
Single stepping until exit from function main,
which has no line number information.
[New Thread 5332.0x77c]
[New Thread 5332.0x1428]
[New Thread 5332.0x550]
[New Thread 5332.0x898]
[New Thread 5332.0x107c]
[New Thread 5332.0x4bc]
[New Thread 5332.0x1378]
[New Thread 5332.0x154c]
[New Thread 5332.0x16e4]
[New Thread 5332.0x1358]
[New Thread 5332.0x1334]
[New Thread 5332.0x1154]
0x00401288 in __register_frame_info ()
(gdb)
I tried to make a simple hello world program and run it with gdb and it works.
I'm probably doing something wrong in the makefile or because i'm using shared libraries has to do something with it.
Does anyone know what is wrong?
Thanks