These instructions were tested in Visual C++ 2010 Express.
From this website download "SymbolicC++3 3.35 for Visual C++"".
Unzip the archive.
Double click the file SymbolicC++3\SymbolicC++3.sln
. This is the Microsoft Visual Studio Solution.
The Visual Studio Conversion Wizard will start. Click Next.
At the "Choose Whether To Create Backup" step, click Next.
At the "Ready to Convert" step, click Finish.
At the "Conversion Complete" step, click Close.
Press 'F7' to build the solution.
At this point you might receive many errors in the Output window. If so, edit the file Program Files (x86)\Microsoft Visual Studio 10.0\vc\include\xlocmon
and change line 410 from:
_Str2 += '-', ++_Off;
to
{ _Str2 += '-'; ++_Off; }
and press 'F7' to begin the build again. See this StackOverflow question for more discussion about this problem and workaround.
Create an example project
In the Solution Explorer, right click the solution, and select "Add" -> "New Project".
Select "Win32 Console Application".
Name your project "Example".
In the "Win32 Application Wizard" click Next. Click Finish.
In the Solution Explorer, right click on the Example project and select "Set as StartUp Project".
In the Solution Explorer, right click on the Example project. Select "References...". Select "Add New Reference...". The "SymbolicC++3" project should be selected. Click OK.
Click OK.
In the Solution Explorer, right click on the solution, select "Configuration Manager...".
Change the configuration for "Example" to "Release".
Change the configuration for "SymbolicC++3" to "Static".
Click "Close".
In your Example.cpp source file, enter this example program:
#include "stdafx.h"
#include "..\include\symbolicc++.h"
int _tmain(int argc, _TCHAR* argv[])
{
auto x = Symbolic("x");
auto y = Symbolic("y");
auto z = x * 3 * y * 4 * y * x / y;
cout << "simplified: " << z << endl;
cout << "numerical value: " << z[x == 1.2, y == 3.4] << endl;
system("pause");
return 0;
}
Press 'F5' to run the program.