problem linking metis libraries in linux

I am a novice when it comes to using and administering linux. In grad school, I had tech support who could help me out, but now I am at a place where I have to figure things out for myself.

I am trying to use a library of functions known as metis-4.0 found at Obtaining METIS | Karypis Lab. I have no problem extracting the tar.gz file and it is all in a directory called metis-4.0, which I put in usr/local/lib/. I followed the instructions to compile and make the library given in the directory and it creates the library libmetis.a in the directory /usr/local/lib/metis-4.0/.

I am using g++ to compile, and everything is compiling correctly, but when I try to link everything together, it doesn't recognize functions that are supposed to be defined in the library libmetis.a. All of the .o files (for the library) and .h files are in the directory /usr/local/lib/metis-4.0/Lib/

My compilation looks like:

g++ -O2 -I/usr/local/lib/metis-4.0/Lib -c partition.cpp
g++ -O2 -I/usr/local/lib/metis-4.0/Lib -c cuthill-mckee.cpp
g++ -I/usr/local/lib/metis-4.0/Lib -L/usr/local/lib/metis-4.0/Lib -o partition partition.o cuthill-mckee.o -lm -L/usr/local/lib/metis-4.0/libmetis.a
partition.o: In function `main':
partition.cpp.text+0x1c04): undefined reference to `METIS_PartGraphKway(int*, int*, int*, int*, int*, int*, int*, int*, int*, int*, int*)'
collect2: ld returned 1 exit status
make: *** [all] Error 1

Can anyone tell me what I am doing wrong?



RE: problem fixed

I downloaded the experimental version and I was able to compile my code without any problems. I am not sure what the problem is/was. I suspect that there may be some architecture or compiler issues. For whatever reason gcc (v. 4.3.2) couldn't find the necessary function in the library libmetis.a. It may be helpful to put a note on the downloads page saying that for modern computers and compilers, it may be better to use the experimental version instead of the "stable" version.