compile programs with multiple files

Hi,

I've been learning C++ and I've just written my first multi-file program. I have three files:

golf.h (contains the header)

golf.cpp (contains the function definitions)

golfmain.cpp (contains the main() code)

Previously, for single file programs, I have been using the command line command:

cl /clr [programname].cpp

to compile things. Could anyone tell me (or guide me to the place where I can find out) how to compile multi-file programs Thanks!

Chris



Answer this question

compile programs with multiple files

  • daverage

    Using command line tools is going to get you into a lot of trouble by the time you need to link, compile resources, embed manifests and generate debugging info. Use the IDE and create a project, it was designed to take care of all the details...


  • Sergio Ordine

    cl /clr golf.cpp golfmain.cpp

    or

    cl /clr *.cpp



  • compile programs with multiple files