c++visual-studiocommand-linelinker

compiling multiple-source-file programs c++ using visual studio devolopers command prompt


i have three files one is main.cpp the other one is GradeBook.h and GradeBook.cpp* GradeBook.h is the public interface and GradeBook.cpp is GradeBook member-function definitions. This file contains implementations of the member functions prototyped in GradeBook.h.

How do i link and compile these files and be brief because i am learning c++ right until now i can compile c++ files using cl\EHsc command but after making three files i cant link them and compile please help.


Solution

  • I think you will get details here.

    http://msdn.microsoft.com/en-us/library/ms235639%28v=vs.100%29.aspx

    For more compiler options you can check link below http://msdn.microsoft.com/en-us/library/fwkeyyhe(v=vs.100).aspx