Results 1 to 4 of 4
Behold, WindowsDude is back!
I have problems linking stuff. I have this single library dpotrf that I want to use. I declare it like this:
Code:
extern void dpotrf_(char*, int*, ...
- 06-01-2010 #1
How to link
Behold, WindowsDude is back!
I have problems linking stuff. I have this single library dpotrf that I want to use. I declare it like this:
And call it somewhere in main:Code:extern void dpotrf_(char*, int*, double**, int*, int*);
The problem is that I have to link it somehow. It is a .f file, and last time I worked with it it seems like I compiled it into a .o file using ifort I guess. So I have the .o file already.Code:dpotrf_(&uplow, &order, A, &size, &info);
I think I can include it like this, but I have no idea because the syntax isn't intuitive:
icc -std=c99 -03 main.c dpotrf.o
Ok great, I get different errors, now it seems like this library requires other libraries. Consequently I do like this:
icc -std=c99 -O3 main.c dpotrf.o lsame.o xerbla.o ilaenv.o dsyrk.o dpotf2.o dgemm.o dtrsm.o ddot.o dgemv.o dscal.o
But I still get complaints
xerbla.o: In function `xerbla_':
xerbla.f:(.text+0x45): undefined reference to `for_write_seq_fmt'
xerbla.f:(.text+0x62): undefined reference to `for_write_seq_fmt_xmit'
xerbla.f:(.text+0x7f): undefined reference to `for_stop_core'
ilaenv.o: In function `ilaenv_':
ilaenv.f:(.text+0x7a): undefined reference to `for_cpystr'
How can I avoid these godforsaken errors?
On some random site on the net I found that I should include this -L/opt/intel/Compiler/11.1/072/lib but it didn't help.
- 06-01-2010 #2
WindowsDude unexpectedly found the answer by doing like this:
icc -L/opt/intel/Compiler/11.1/072/lib main.c -std=c99 -O3 dpotrf.o lsame.o xerbla.o ilaenv.o dsyrk.o dpotf2.o dgemm.o dtrsm.o ddot.o dgemv.o dscal.o -L/opt/intel/Compiler -Bstatic -lifport -lifcore -Bdynamic -limf
But the function completes in almost no time. Could be an error?
- 06-02-2010 #3
- 06-02-2010 #4
Yes, unfortunately I had to do that. But I don't remember what was wrong.
This problem should be solved now. But the terminal thing from that other thread still bothers me.


Reply With Quote
