L T B H P N

Submitting Class Projects

When you submit class projects the TAs and I will unzip your submission in an empty directory and type compile and then run. Compile should trigger a compile.bat file to build your project and Run should trigger a run.bat file to run the resulting executable. That will need any command line arguments and test inputs needed to demonstrate that your project meets the Project Statement requirements (each shall).

Note that means that your Executive package is expected to demonstrate all functional requirements. It also means that you cannot use absolute paths to the directories you need to access - those with test inputs for example. If you use absolute paths the processing will almost certainly fail because our test machines have different directory structure than you development machine. You will find that relative paths will work as expected.

This also means that you should test your project before submission by doing just what the TAs and I will do, e.g., unzip into an empty directory and type compile then run. In order to make this work as expected you need to open the Visual Studio 2015 Developer's Console, which has environment variables set so that all the Visual Studio tools will be found.

Batch File for Building an executable from C++ or C# files


Create a compile.bat file that contains one of the statements below:
  1. build using IDE engine from command line:

    devenv mySolution.sln /rebuild debug // this is the easiest way
  2. build using VC++ compiler from command line:

    CL /DTEST_MYMODULE /EHsc MyModule.cpp, ... // list all cpp files
  3. build using C# compiler from command line:

    CSC /DTEST_MYMODULE MyModule.cs, ... // list all C# files
MySolution is the sln file generated by the IDE when you created a solution.
MyModel is the name of a module you want to build.
TEST_MYMODULE is the value of the string in #ifdef xxx preprocessor directive before the module's test stub main function.

You can see all of the options accepted by devenv using the command line command: devenv /?
The options available from the C++ compiler are show with the command line command: cl /?
The options available from the C# compiler are show with the command line command: csc /?

Note that this assumes that devenv.exe, CL.exe and CSC.exe are on your path. If you use the Visual Studio command shell then all the Visual Studio compilers, devenv, and other tools will be on your path. To test your batch files you will need to navigate to that directory or use their full path names.

To run the Visual Studio Command Prompt execute a Windows search on Command Prompt and select VS2015 x64 Native Tools Command Prompt. When you open that you must navigate to the directory holding your compile.bat file and type compile.

Note that the TAs will grade on a machine with path including devenv so you simply use the batch file contents shown above.

Batch File for Running Project


Create a run.bat file that runs your executuable, supplying it with all the command line options and file patterns it needs to demonstrate that you meet all project requirements.
  1. myExe.exe /n2 *.h *.cpp // these are example arguments. You supply what you need to run.

Submitting Your Project:


Before submitting, open VisualStudio and open your project. Clean the solution, then close VisualStudio. Then delete the *.sdf file and the ipch folder. Now, zip your project folder. Please use Windows Explorer to navigate to your folder, right-click and send to compressed file. DO NOT USE RAR OR 7ZIP OR ....

To make sure your compile.bat and run.bat files work, create an empty directory, copy in your SomeStudentName-project1.zip file, extract it, and run your compile and run.bat files using the VisualStudio 2012 Command Prompt. You may find they don't work and can fix them before submitting so you won't lose points.

Late solutions lose 1 point per day. You are late if your upload is time-stamped after Midnight (even if only by one second).

Now submit using this link: upload.

campus at night