I'm trying to make a makefile with multiple files. Can someone help me? The files I have are file1.cpp, file2.h and main.cpp
file1.cpp contains my functions. file2.h contains the declaration of my functions.
main.cpp [includes file2.h in the code] file1.cpp [includes file2.h in the code]
i did
all: main
gcc -g -Wall -o main main.cpp
but it gives me tons of bugs when i try to compile. my codes works perfectly fine on eclipse.