Re: c calling a fortran subroutine

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



hi Carl,

I am able, now, to run dumpbin at my PC. In any case, I ran /EXPORTS, and
got the following:

Dump of file sftck3.lib
File Type: LIBRARY
Exports
ordinal name
_SFTCK3

Summary
C3 .debug$S
14 .idata$2
14 .idata$3
4 .idata$4
4 .idata$5
C .idata$6

I checked this against a known working DLL I previously created in C, and
the output
is similar. So now I'm thinking that the subroutine name is there, but that
the original error "unresolved external symbol _SFTCK3@0" is indicating the
function name is undefined to the function that is calling it. Normally, in
C, I would have some kind of #include "xxxxxxxx" to define SFTCK3. Do I need
some type of .h to go with my fortran dll?


"Carl Daniel [VC++ MVP]" wrote:

> RichN wrote:
> > Thanks for reply Carl. I was never able to get dumpbin.exe to work on
> > my PC, so had colleague run it on his. After running dumpbin on my
> > SFTCK3.lib, I got the following:
> >
> > File Type: LIBRARY
> >
> > COFF SYMBOL TABLE
> > 000 005D0C05 ABS notype Static | @COMP.ID
> > 001 00000000 SECT2 notype External |
> > __IMPORT_DESCRIPTOR_SFTCK3 002 C0000040 SECT2 notype Section
> > | .idata$2 003 00000000 SECT3 notype Static | .idata$6
> > 004 C0000040 UNDEF notype Section | .idata$4
> > 005 C0000040 UNDEF notype Section | .idata$5
> > 006 00000000 UNDEF notype External |
> > __NULL_IMPORT_DESCRIPTOR 007 00000000 UNDEF notype External
> > | |SFTCK3_NULL_THUNK_DATA
> >
> > String Table Size = 0x50 bytes
> >
> > COFF SYMBOL TABLE
> > 000 005D0C05 ABS notype Static | @comp.id
> > 001 00000000 SECT2 notype External | __NULL_IMPORT_DESCRIPTOR
> >
> > String Table Size = 0x1D bytes
> >
> > COFF SYMBOL TABLE
> > 000 005D0C05 ABS notype Static | @comp.id
> > 001 00000000 SECT2 notype External | |SFTCK3_NULL_THUNK_DATA
> >
> > String Table Size = 0x1C bytes
> >
> > Summary
> >
> > C3 .debug$S
> > 14 .idata$2
> > 14 .idata$3
> > 4 .idata$4
> > 4 .idata$5
> > C .idata$6
> >
> > I checked out many online sites to try and understand what this is all
> > telling me. I generally have an idea now about the fields, but can't
> > translate that into how it effects my particular problem. Can you
> > help on that? Also, would have running dumpbin /EXPORTS helped me to
> > know what subroutine name the dll is showing?
> > Thanks again for your earlier reply.
>
> Odd - it doesn't look like your function was exported from the DLL.
>
> Yes, try running dumpbin /exports against the DLL to see what it shows.
>
> -cd
>
>
>
.



Relevant Pages

  • Re: ActivateDevice failure.
    ... Well, I tried the dumpbin ... /EXPORTS on my driver, but this is what I got: ... File Type: DLL ...
    (microsoft.public.windowsce.platbuilder)
  • Re: PInvoke a legacy class?
    ... Which parts actually constitute the mangled name DllImport is looking for? ... > or the numeric ordinal - you can use dumpbin or depends to find out this ... > then P/Invoke this from managed code. ... But how do you do that for a legacy dll that is built as a ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: GetprocAddress() error
    ... >> You will be enlightened to the problem when you use dumpbin /exports ... >> Michael Salamone ... >>> The dll was created by WCE DLL Wizard, ... >>>> verify the exports in your DLL, ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: unresolved external symbol/using an external dll
    ... Use dumpbin /exports on the library file. ... Most likely you need to have the functions declared with extern "C". ... >> function signatures that are externally available from this dll. ... or if VC++ is simply not able to access the .lib files or if the ...
    (microsoft.public.vc.language)
  • Re: unresolved external symbol/using an external dll
    ... Use dumpbin /exports on the library file. ... Most likely you need to have the functions declared with extern "C". ... >> function signatures that are externally available from this dll. ... or if VC++ is simply not able to access the .lib files or if the ...
    (microsoft.public.windowsce.app.development)