openSUSE Forums > Programming/Scripting » problem linking with metis libraries with c++

Go Back   openSUSE Forums > Programming/Scripting
Forums FAQ Members List Search Today's Posts Mark Forums Read


Programming/Scripting Questions about programming, bash scripts, perl, php, cron jobs, ruby, python, etc.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 22-Sep-2009, 11:55
Puzzled Penguin
 
Join Date: Sep 2009
Posts: 1
kyle_lange81 hasn't been rated much yet
Default problem linking with metis libraries with c++

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?

Thanks,

Kyle
Reply With Quote
Reply

Bookmarks


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2