g++ link error with libmetis.a
I use g++ to compile and link my c++ code which uses METIS_PartMeshNodal routine. And I got the error
bsplele.o: In function `main':
bsplele.cpp:(.text+0x45e): undefined reference to `METIS_PartMeshNodal'
collect2: ld returned 1 exit status
Thanks.
Submitted by jiangwen84 on Fri, 2011-10-28 19:42
»
- Login to post comments
RE: SOLVED
Hello jiangwen84!
I solved the problem for my program...
I just paste the -lmetis at the end of the compilation command and now it is working!
RE: Sombody here?
I need answers, somebody is reading???
RE: Here are some questions: 1.
Here are some questions:
1. Did you include the metis.h header file from metis' include directory?
2. Did you link against libmetis.a?
RE: Thanks for your reply. 1.
Thanks for your reply.
1. metis.h is included in my code.
2. libmetis.a is installed under /usr/local/lib, so it should be linked correctly. I also try to give the lib path by -L/usr/local/lib -llibmetis. But it also gives me same error.
RE: still need help
I have not figured it out. Could you give some suggestions? Thanks.
RE: Same error
I have exactly the same error when I try to compile with gcc...
Do you found a solution?
RE: Same error
I have exactly the same error compiling with gcc and I don't know what to do...
Do you found a Solution?
RE: Re
I haven't found solution yet.
I would appreciate any suggestions on this issue. Thanks.
RE: Try this: -L/usr/local/lib
Try this:
-L/usr/local/lib -lmetis