Re: calling DLL
- From: "William DePalo [MVP VC++]" <willd.no.spam@xxxxxxxx>
- Date: Thu, 19 May 2005 16:54:49 -0400
"Bill Grigg" <BillGrigg@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:97C78AAC-2D9A-4CAF-82FF-55F242DE4BEE@xxxxxxxxxxxxxxxx
> OK here it is from dumpbin:
>
> Dump of file rnavandrpop.dll
> ...
> 0 0001A78A Relnav_Exec
> ...
> 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);
>
Oh boy. With the exception of what looks like a typo in the lower case 'e'
in 'exec' above, the names look OK.
> 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...
Then maybe the problem is not so much name mangling as DLL Hell. You should
place the import library (.lib file) created by the linker at the time that
the DLL was built in the libraries directory. Make sure you have only one
copy of the DLL on your system. Then if you are debugging the executable,
you can put the DLL in the same directory as the executable. You didn't
earlier place the DLL in one of the other directories along the PATH did
you?
Alternatively, if you are debugging the DLL, you can go to your project's
Debug property settings. Then in the box labelled "Command" enter the name
of the executable that implicitly loads the DLL. You can also enter any
optional parameters as well as the startup directory.
Regards,
Will
.
- Follow-Ups:
- Re: calling DLL
- From: Bill Grigg
- Re: calling DLL
- References:
- calling DLL
- From: Bill Grigg
- Re: calling DLL
- From: William DePalo [MVP VC++]
- Re: calling DLL
- From: Bill Grigg
- calling DLL
- Prev by Date: Re: How Can I solve this error
- Next by Date: Re: calling DLL
- Previous by thread: Re: calling DLL
- Next by thread: Re: calling DLL
- Index(es):
Relevant Pages
|