c++ how should the makefile look -


Suppose I have these C ++ files, how should I write a basic messaging (using G ++) for them?
a CPH ah, BCPP BH, CCPP CH, IPHHH: When BH is included in AH, CH contains BH and main H include CH?

Thank you very much

How to compile a file? Say you have test.cpp and test.h is, compile it and link:

  g ++ to - C test.cg ++ - o Test Test. O  

The easiest Mekfail :

  test: test.o # mess test depends on test.o G ++ Is -o test test. O test. O: Test CPP test.h # Memo test.o depends on test.cpp and test.h g ++ -c test.cpp # if you want to clean? Add the bottom line also clean: RM test test. O  

If your app depends on a number of files,

  test: test1.o test2.o test3.o #means your app test1. o depending on test2.o and test3.og ++ -o test test1.o test2.o test3.o test1.o: test1.cpp test1.hg ++ -c test1.cpp test2.o: test2.cpp Test2.hg ++ -c test2.cpp ...  

Comments

Popular posts from this blog

python - Writing Greek in matplotlib labels, titles -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

Pygame memory leak with transform.flip -