- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
1>Linking...
1>mkspline.obj : error LNK2001: unresolved external symbol _R8MKSPLINE@36
1>C:MathLinkPSplineMLReleasePSplineML.exe : fatal error LNK1120: 1 unresolved externals
Here is how the Fortran file is set up:
subroutine r8mkspline(x,nx,fspl,ibcxmin,bcxmin,ibcxmax,bcxmax,
>ilinx,ier)
!DEC$ ATTRIBUTES DLLEXPORT :: R8MKSPLINE
and reading the .lib file with WordPad it looks like this at the end:
_R8MKSPLINEpspline.dll
I am trying to reference it in C like this:
void _stdcall R8MKSPLINE(double *x, int *nx, double *fspl, int *ibcxmin, double *bcxmin, int *ibcxmax, double *bcxmax, int *ilinx, int *ier);
What else do I need to do. I feel that I am almost there this is the last error left, of course, it will probably be a miracle if it works in MathLink
Bob Rimmer
P.S. I couldn't seem to make it work as a static library, probably because the program makes a lot of write calls to the console. I can eventually get rid of these, but I would like to see something work before I edit 163 files.
링크가 복사됨
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
If you instead need __stdcall for compatibility with other stuff, you can specify it on Fortran side like:
!DEC$ATTRIBUTES DLLEXPORT, STDCALL, DECORATE, ALIAS: "R8MKSPLINE":: R8MKSPLINE
That will give you "_R8MKSPLINE@36" instead of "_R8MKSPLINE".
Tip: there are two better tools for the job than Notepad. One is dumpbin.exe, used from command line like:
dumpbin /exports dllname.dll > temp.txt
and
dumpbin /symbols libname.lib > temp.txt
that will give you list of exact dll's exports and list of library's routines in file temp.txt.
The other is Dependency Walker, with nice GUI interface.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
