I will you show my misinterpretation.
- it says there must be del *.obj in the bat file
- it says there must be an obj file
- it says the obj file must actually be a cpp file
Please, show me your interpretation.
http://computerprogramming.suite101.com/article.cfm/the_borland_win32_compiler_guide
Thanks!
Your question’s a little confusing but I’ll try it out.
Typically, you have a group of C++ source files, for example,
x.cppandy.cpp.The compile phase will take these and create, for example,
x.objandy.obj.The link phase will take these and create a single executable, for example,
xy.exe.1/ The reason you would have a
"del *.obj"in the batch file is to delete all object files so that the make can recreate them. Make (if you’re using intelligent rules in the makefile) will only rebuild things that are needed (an example being that thecppfile will not be compiled to anobjfile if the currentobjfile has a later date than it). Deleting the object file will force a new one to be created.2/ There doesn’t have to be an object file, these are typically created from the
corcppsource files. In addition, you can combine compile and link phases so that no object files are created (or are destroyed pretty quickly once they’re finished with).3/ The object file doesn’t have to be a
cppfile, but it’s usually built from acppfile with the same base name.Update based on comment:
If you want to only specify your application name once, your comments have it like this (I think, the format’s not that great as you pointed out):
I think what you need is:
What you have with your
"$(APP)"substitutions is something that will work inside a makefile, but not inside a cmd file. There you need to use the %APP% variant to get what you want.