P
Praveen Srinivasan
Hi,
I'm trying to link a g++ program against a library called libumf.a compiled
from C code, and am having problems. When I do
gcc -o foo.o foo.c -llibumf.a it works fine. But when I do
g++ -o foo.o foo.c -llibumf.a it complains with:
/tmp/ccg2Xl4u.o(.text+0x17): In function `main':
: undefined reference to `umfpack_di_free_numeric(void**)'
collect2: ld returned 1 exit status
where "umfpack_di_free_numeric(void**)" is the only function that I'm
calling from the library.
Is there something I need to know about linking C++ code with C libraries?
TIA,
Praveen
I'm trying to link a g++ program against a library called libumf.a compiled
from C code, and am having problems. When I do
gcc -o foo.o foo.c -llibumf.a it works fine. But when I do
g++ -o foo.o foo.c -llibumf.a it complains with:
/tmp/ccg2Xl4u.o(.text+0x17): In function `main':
: undefined reference to `umfpack_di_free_numeric(void**)'
collect2: ld returned 1 exit status
where "umfpack_di_free_numeric(void**)" is the only function that I'm
calling from the library.
Is there something I need to know about linking C++ code with C libraries?
TIA,
Praveen