Re: calling DLL
- From: "Bill Grigg" <BillGrigg@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 19 May 2005 13:21:06 -0700
OK here it is from dumpbin:
Dump of file rnavandrpop.dll
File Type: DLL
Section contains the following exports for RNAVandRPOP.dll
0 characteristics
428CED7C time date stamp Thu May 19 15:48:12 2005
0.00 version
1 ordinal base
3 number of functions
3 number of names
ordinal hint RVA
name
1
0 0001A78A Relnav_Exec
2
1 0001A131 fnRNAVandRPOP
3
2 000585F4 nRNAVandRPOP
I am trying to call Relnav_exec. In the dll project it is declared this way:
__declspec(dllexport) void Relnav_Exec(
RNAV_Initial *init,
RNAV_Inputs *inputs,
RNAV_stateOutput *state,
RNAV_TelemetryOutputs *telem);
In the dll project that is try to call it it is declared this way:
__declspec(dllimport) void Relnav_Exec(
RNAV_Initial *init,
RNAV_Inputs *inputs,
RNAV_stateOutput *state,
RNAV_TelemetryOutputs *telem);
Both dll projects use the option "Compile as C code". The error message from
the linker is the following:
TEES error LNK2019: unresolved external symbol __imp__Relnav_Exec referenced
in function _WrapRelnavExec
Actually I just noticed that even though I deleted the reference to the
directory that contains the .dll and .lib I get the same error message. This
implies to me that somehow the DLL is not being located as opposed to the
function declaration being incorrect. As I mentioned in my first post I
placed the path for the DLL in the "Additional libraries directories". Help...
Bill
"William DePalo [MVP VC++]" wrote:
> "Bill Grigg" <Bill Grigg@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:86CA4570-13AA-4A39-918E-3FDE3CA5DD16@xxxxxxxxxxxxxxxx
> >I have been successfully calling DLL's using VC++ 6.0 and also using
> >VC++7.1
> > (.NET). I only mention this because I have never felt comfortable with the
> > process, but nonetheless it did work. Recently I started calling an
> > unmanaged
> > DLL from a .NET app. It worked fine. Now I have the situation where I am
> > trying to call a function in one DLL from another DLL. Both are unmanaged
> > and
> > are built with VC++7.1. In the calling DLL I set the property
> > page/linker/general/additional library directories to point to the
> > directory
> > that contains MyDll.lib and MyDll.dll. The entry point is NOT being found.
> > I
> > am sure that the signature is correct and that the DLL import/export
> > modifiers are correct. Everything is being compiled as C (instead of C++).
> > Any suggestions would be most welcome.
>
> It may be an issue of compiler name decoration (aka mangling).
>
> For the DLL that contains the function you are trying to call do this:
>
> dumpbin /exports YourDllNameGoesHere.dll
>
> Find the name of the exported function that most closely matches the one
> that you are trying to call. Post that here. Then also show the declaration
> of that function in the module that makes the call and state whether the
> caller is written in C or C++. Chances are someone will spot the error.
>
> Regards,
> Will
>
>
>
.
- Follow-Ups:
- Re: calling DLL
- From: Tamas Demjen
- Re: calling DLL
- From: William DePalo [MVP VC++]
- Re: calling DLL
- References:
- calling DLL
- From: Bill Grigg
- Re: calling DLL
- From: William DePalo [MVP VC++]
- calling DLL
- Prev by Date: Re: C++ managed...force runtime version?
- Next by Date: Re: How Can I solve this error
- Previous by thread: Re: calling DLL
- Next by thread: Re: calling DLL
- Index(es):
Relevant Pages
|