How to creat a C++ Makefile und use it -


i try write c++ programm on win10 mingw cant run makefile, try few ours , think understand of still not work..

hashtabelletest.o: main.o hashtabelle.o     g++ -o hashtabelletest main.o hashtabelle.o  main.o: main.cpp hashtabelle.cpp     g++ -c main.o main.cpp  hashtabelle.o: hashtabelle.cpp hashtabelle.h     g++ -c hashtabelle.o hashtabelle.cpp hashtabelle.h  clear:     rm *.o *.exe 

as admin use mingw32-make says nothing done 'makefile.mak'

i try edit the parts new still same thing

as know little diffence in win,such there's no rm del.but u'd better wirte all: in both system.in linux,i use below format

cc      =   g++ ld      =   g++ cflags  =   -wall -g -o0 lflags  =     all:main.elf  clean:     rm -rf *.o *.elf  ########################## main.elf:main.o x.o y.o     $(ld) -o $@ $^ $(lflags)  %.o:%.cpp     $(cc) -c -o $@ $< $(cflags) 

Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -