tags:

views:

81

answers:

1

can i use Symbolic C++ features in linux c++ compiler or in visual c++ 2010? and also one question sometimes in programs there is such headers code

#include <iostream>
#include "symbolicc++.h"
using namespace std;

int main(void)
{
 Symbolic x("x");
 cout << integrate(x+1, x);     // => 1/2*x^(2)+x
 Symbolic y("y");
 cout << df(y, x);              // => 0
 cout << df(y[x], x);           // => df(y[x],x)
 cout << df(exp(cos(y[x])), x); // => -sin(y[x])*df(y[x],x)*e^cos(y[x])
 return 0;
}

header #include "symbolicc++.h" i have tried

#include " " but it does not show me symbolicc++.h so how to do it please give me a few example

there is such error after compile
symbolic.cpp:2:25: error: symbolicc++.h: No such file or directory
symbolic.cpp: In function ‘int main()’:
symbolic.cpp:7: error: ‘Symbolic’ was not declared in this scope
symbolic.cpp:7: error: expected ‘;’ before ‘x’
symbolic.cpp:8: error: ‘x’ was not declared in this scope
symbolic.cpp:8: error: ‘integrate’ was not declared in this scope
symbolic.cpp:9: error: expected ‘;’ before ‘y’
symbolic.cpp:10: error: ‘y’ was not declared in this scope
symbolic.cpp:10: error: ‘df’ was not declared in this scope
symbolic.cpp:12: error: ‘cos’ was not declared in this scope
symbolic.cpp:12: error: ‘exp’ was not declared in this scope
+1  A: 

Go to http://issc.uj.ac.za/symbolic/symbolic.html , download e.g. the SymbolicC++3 3.34 gzipped tar file.

Unpack that tar.gz file, and adjust your compiler/IDE to search for additional header files in the headers/subdir.

e.g. using a command line on Linux:

[nos@localhost ~]$ wget http://issc.uj.ac.za/symbolic/sources/SymbolicC++3-3.34.tar.gz
16:20:24 (109.71 KB/s) - `SymbolicC++3-3.34.tar.gz' saved [155572/155572]
[nos@localhost ~]$ mkdir symbolicc++
[nos@localhost ~]$ cd symbolicc++/ &&  tar -xvzf ../SymbolicC++3-3.34.tar.gz   ; cd ..
[nos@localhost ~]$ gcc -Wall -I/home/nos/symbolicc++/headers -o myprogram myprogram.cpp
nos