Home > Archive > VC Language > May 2006 > How to use dll functions
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
How to use dll functions
|
|
| Arsalan Ahmad 2006-05-24, 8:09 am |
| Hi all,
I have created a dll. And now I want to use that dll's function in my
application. But the problem is that I am getting linker error like:
TestChat.obj : error LNK2019: unresolved external symbol _MyFunction@0
referenced in function _WinMain@16
Please tell me what should I do to avoid linker errors. I think a dll
project also creates a lib file which you can link with your application's
project and then you run you application then your application direclty uses
dll then if it is present in current folder or system path. But my dll
project is not creating any lib file. How can create such lib file? I dont
want to load my dll using LoadLibrary() and then get address to its
functions and call them.
Thanks,
Arsalan
| |
| Jeff Partch [MVP] 2006-05-24, 8:09 am |
| "Arsalan Ahmad" <arsal__@hotmail.com> wrote in message
news:%23m6JWsyfGHA.3456@TK2MSFTNGP05.phx.gbl...
> Hi all,
>
> I have created a dll. And now I want to use that dll's function in my
> application. But the problem is that I am getting linker error like:
>
> TestChat.obj : error LNK2019: unresolved external symbol _MyFunction@0
> referenced in function _WinMain@16
>
> Please tell me what should I do to avoid linker errors. I think a dll
> project also creates a lib file which you can link with your application's
> project and then you run you application then your application direclty
> uses dll then if it is present in current folder or system path. But my
> dll project is not creating any lib file. How can create such lib file? I
> dont want to load my dll using LoadLibrary() and then get address to its
> functions and call them.
>
My guess would be that if your dll project is generating no import lib, then
it is not exporting anything. How for example, do you export MyFunction?
--
Jeff Partch [VC++ MVP]
|
|
|
|
|