c++ - What is wrong with my makefile? Cannot find implementation -



c++ - What is wrong with my makefile? Cannot find implementation -

this makefile:

cc = g++ cflags = -std=c++11 default: main main: core.o $(cc) $(cflags) main.cpp core.o -o run.exe core.o: core.h core.cpp display.h eventhandler.h $(cc) $(cflags) -c core.cpp eventhandler.o: eventhandler.h eventhandler.cpp $(cc) $(cflags) -c eventhandler.cpp clean: $(rm) run.exe *.o *~

but when trying compile error saying cannot find implementation of function defined in eventhandler.cpp, sure it's there. doing wrong?

this

main: core.o $(cc) $(cflags) main.cpp core.o -o run.exe

should be

main: core.o eventhandler.o $(cc) $(cflags) main.cpp core.o eventhandler.o -o run.exe

c++ makefile

Comments

Popular posts from this blog

model view controller - MVC Rails Planning -

ruby on rails - Devise Logout Error in RoR -

html - Submenu setup with jquery and effect 'fold' -