Hi all:

I am trying to compile sparse matrix solver, wsmp, in my program. But I
always get following error message:
/home/YZhou/Cprogram/sparse_test/lss.cpp:108: undefined reference to
`wsetnobigmal'
/tmp/ccYLWe54.o(.text+0x1f5):/home/YZhou/Cprogram/sparse_test/lss.cpp:110:
undefined
reference to `wsetmaxthrds'
/tmp/ccYLWe54.o(.text+0x28e):/home/YZhou/Cprogram/sparse_test/lss.cpp:114:
undefined
reference to `wssmp'

They are functions in wsmp. 
I also used rtc() in my program. The linker doesn't report error on this
one. Following is how I declare the functions in my program:

extern "C" {
        void wssmp( int* N, int* IA, int* JA, double* AVALS, double* DIAG,
                int* PERM, int* INVP, double* B, int *LDB,
                int* NRHS, double* AUX, int* NAUX, int* MRP, int* IPARM,
                double* DPARM );
        double rtc();
        void wsetmaxthrds(int*);
        void wsetnobigmal();
}

Here is how my Makefile looks: 
all: 
         g++ -o wgsmp wgsmp_ex1.cpp -L../lib/libgoto_opteron-64-r0.99-3.so
-L../lib -lwsmp64 -lpthread -Wno-deprecated 

The author said it may have something to do with  the compiler inserting
trailing underscores, etc. 

Could anyone tell me how to solve this problem? 

Any idea is appreciated!

Yinghong




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to