In version 3, CUDD got a major overhaul of its build system, so older HOWTOs for compiling programs that use CUDD are no longer applicable.
To simplify the build process, I typically recommend to build against CUDD statically -- this allows you to run the later compiled program without giving the paths to the CUDD library and/or installing the CUDD library into "/usr/lib".
To do so, first recompile cudd with:
./configure --enable-dddmp --enable-obj --enable-shared --enable-static; make
This makes sure that the static library is build, along with the optional components of CUDD that you may later need.
Then, you can compile your example program from the command line as follows:
gcc test.c -o testprogram -I /path/to/cudd-3.0.0/cudd -I /path/to/cudd-3.0.0/util -I /path/to/cudd-3.0.0/ -static -L /path/to/cudd-3.0.0/cudd/.libs/ -lcudd -lm
There are other ways of compiling against CUDD, but I'm personally not a big fan of globally installing libraries. If you start to use more features of CUDD, you may have to add more include directories for the compiler to find the CUDD .h files, and more libraries may be needed. Note that all parameters starting with "-static" are linker parameters in the compilation command above, while the others are for the compiler - this is important to know when you start writing Makefiles to automate your build process. A sample Makefile looks as follows:
CFLAGS = -I /path/to/cudd-3.0.0/cudd -I /path/to/cudd-3.0.0/util -I /path/to/cudd-3.0.0/
LFLAGS = -static -L /path/to/cudd-3.0.0/cudd/.libs/ -lcudd -lm
default: testprogram
testprogram: test.o
$(CC) test.o -o testprogram $(LFLAGS)
test.o: test.c
$(CC) test.c -c -o test.o $(CFLAGS)
Please consult a more comprehensive documentation for how to write Makefiles or use an alternative build system. Note that in the above file, the "four spaces in a row" need to be tabs in order for the Makefile to work. If you store it in the same directory as "test.c" under the name "Makefile", running "make" should build the program.