How to compile C program using the OSSP mm library and gcc?
Has anyone here have any experience using OSSP mm library?
The documentation is very limited for someone like me who is new to linux and c programming.
The installation procedure is as follows:
$ ./configure --prefix=/path/to/mm
$ make
$ make test
$ make install
but I changed /path/to/mm to /usr/local/
I did the other things accordingly and executed the test code successfully.
The OSSP mm library comes with mm-config which is (taken from the mm-config man page):
"The mm-config program is a little helper utility for easy configuring and building applications based on the mm(3) library. It can be used to query the C compiler and linker flags which are required to correctly compile and link the application against the mm(3) library."
It also contains a sample on how to use the mm-config:
CC=cc
CFLAGS=-O `mm-config --cflags`
LDFLAGS=`mm-config --ldflags`
LIBS=-lm `mm-config --libs`
all: foo
foo: foo.o
$(CC) $(LDFLAGS) -o foo foo.o $(LIBS)
foo.o: foo.c
$(CC) $(CFLAGS) -c foo.c
I tried to follow this sample, however I cannot seem to successfully execute my code and it produces the following error:
[aky@snoopy test]$ error while loading shared libraries: libmm.so.14: cannot open shared object file: No such file or directory
Kindly tell me what I am doing wrong.
Also, if anyone could tutor me on how to use OSSP mm or provide me with sample codes or direct me to OSSP mm support groups, it would be greatly appreciated.
Thanks in advance
|