Re: Calling VC++ dll in exe (VC++) by Lucress
Lucress
Sun Dec 09 23:56:18 PST 2007
On 7 Dez., 16:12, "Scott McPhillips [MVP]" <org-dot-mvps-at-scottmcp>
wrote:
> "Lucress Carol" <incognito...@gmx.de> wrote in message
>
> news:b26ecb47-fce8-48ef-bf46-ed97bd736beb@w40g2000hsb.googlegroups.com...
>
>
>
>
>
> > Hi everyone,
>
> > I'm trying to call a DLL that I created using Microsoft Visual C++ 6.0
> > in an win32 Console
> > Application.The DLL contains the function(Getarray) I'd like to call
> > in the win32 Console
> > Application.I put the DLL into C:\windows\system32. As I got the error
> > message:
> > error C2065: 'Getarray' : undeclared identifier.... I put the DLL into
> > the directory where the executable for the win32 Console
> > application was to be created.But I still have the same error
> > message.By creating the
> > DLL I included in the project a .def file in order to export the DLL.I
> > also
> > specified the .lib file under Project Settings->Link->Object/Library-
> > Module and I can't understand why
> > the function can't be found.....
>
> > Thanks
>
> The DLL functions must be declared with a header file in your exe project,
> something like
> #include "dllname.h"
>
> This declares the functions to the compiler. (The compiler does not use the
> .lib or .dll files.)
>
> --
> Scott McPhillips [VC++ MVP]- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -
I declared the DLL in the exe project as you mentioned , but I still
have the same error message.I also tried
#include "dllname.dll.h" then comes something like
fatal error C1083: Include file can't be opened: 'dllname.dll.h': No
such file or directory.....
thanks