]> www.ginac.de Git - ginac.git/blobdiff - doc/examples/compile3.cpp
[BUGFIX] Fix crash in parser.
[ginac.git] / doc / examples / compile3.cpp
index 11a5a17070254b2251b12e5ae7f8c2aa61f0029d..c0e5209f5f2ff6837e59eea6dbc77b5326c828ad 100644 (file)
@@ -1,7 +1,11 @@
 #include <ctime>
 #include <iostream>
-using namespace std;
+#ifdef IN_GINAC
+#include "ginac.h"
+#else
 #include <ginac/ginac.h>
+#endif
+using namespace std;
 using namespace GiNaC;
 
 /*
@@ -27,6 +31,9 @@ int main()
                cout << "Building new 'compile3_testprg.so'." << endl;
                symbol a, b;
                ex expr = a*b;
+
+               // Optionally, compile with custom compiler flags:
+               // setenv("CXXFLAGS", "-O3 -fomit-frame-pointer -ffast-math", 1);
                compile_ex(expr, a, b, fp, "compile3_testprg");
        }