Trouble with ParMetis Linking


I'm attempting to link against ParMetis v4.0.3 for a small application I've written. While I'm able to build the ParMetis library files on my machine, I'm having a lot of difficulty linking against these library files (in particular, the "parmetis.a" file).

I'm building and linking on Linux using Make v3.81, CMake v2.8.4, and GCC v4.7.1. I've placed the compiled output of ParMetis into the folder "~/lib/parmetis". The building command for my application is as follows:

mpic++ -g -L ~/lib/parmetis/lib -L ~/lib/metis/lib -lparmetis -lmetis -I ~/lib/parmetis/include -I ~/lib/metis/include partest.cpp -o partest

Every time I attempt to build with this command, I get the following error message:

"... : undefined reference to `ParMETIS_V3_PartMeshKway'"

It seems as though there's some problem with either my linking process or the way in which I've built the ParMetis files, but I cannot seem to isolate the issue. Does anyone have any suggestions or insight as to why this wouldn't be working?

Please let me know if any clarifications about the build environment/code are needed and thanks in advance for your help.