[GiNaC-list] Bug report: Can't construct an expression from a string
Mitch Watrous
watrous at u.washington.edu
Fri Jan 19 20:34:15 CET 2007
Hello.
After the latest version of GiNaC was installed on my machine, my
programs are no longer able to construct an expression from a string.
I am using version 1.3.6-1.fc5 of GiNaC.
My operating system is Fedora Core 5, and I am using version 4.1.1 of
the gcc compiler.
Here is the code that causes the error, which is based on the example
code from the GiNaC tutorial section on expression input:
#include <ginac/ginac.h>
int main()
{
using namespace GiNaC;
symbol x("x"), y("y");
ex e("2*x+sin(y)", lst(x, y));
return 0;
}
Here is the error message I get when I execute the program main:
terminate called after throwing an instance of 'std::runtime_error'
what(): syntax error, unexpected ')' at )
Aborted
Here is my Makefile:
LDFLAGS = -L/usr/lib
CPPFLAGS = -g -I/usr/include
CC = g++
LIBS = -lcln -lginac
main_OBJ = main.o
.PHONY: all clean
all:
$(MAKE) main
clean:
-rm $(main_OBJ)
-rm main
-rm -rf ./tmp
main: $(main_OBJ)
$(CC) $(LDFLAGS) $^ -o $@ $(LIBS)
%.o: %.cpp
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
Thanks for your help,
Mitch Watrous
More information about the GiNaC-list
mailing list