[Winpcap-users] Entry Point in a DLL

George S. Lockwood gslockwood at gmail.com
Mon Aug 7 02:27:07 GMT 2006


Here's an example:

CWPA.obj : error LNK2001: unresolved external symbol "void __cdecl
wpa_cli_cleanup(void)" (?wpa_cli_cleanup@@YAXXZ).

this comes from putting a call to wpa_cli_cleanup() in the destructor of the
class I'm trying to make.  It is not a call to winpcap's dlls but to wpa_cli
code C code (actually to its .objs).

george

On 8/6/06, Gianluca Varenni <gianluca.varenni at cacetech.com> wrote:
>
>  WinPcap can be used within a C++ application without any problem, you
> don't need extern "C" or similar stuff.
>
> What is the exact linking error you are encountering?
>
> Have a nice day
> GV
>
> ----- Original Message -----
> *From:* George S. Lockwood <gslockwood at gmail.com>
> *To:* Tom at redtile.com ; winpcap-users at winpcap.org
> *Sent:* Saturday, August 05, 2006 11:28 AM
> *Subject:* Re: [Winpcap-users] Entry Point in a DLL
>
> Hello Thomas,
>
> I think I'm trying to do something similar but with a standard library I
> (think) am statically linking.  I'm getting link errors about unresolved
> externals.  I am try to build the wpa_cli into a class.
>
> I think my problem is about a class (cpp) file not understanding a lib
> build from straight "C" and thereby not finding a c style functions.
>
> Either I'm getting forgetful (very possible), or involved with .net too
> much too recently to remember (also possible) that I'm forgeting the way to
> link C-style functions into a cpp module and call those external functions.
>
> What am I forgetting?? Or am I forgetting that it is impossible.  I
> thought I needed to declare the externals with something like __decl or with
> "C"    inside the cpp file???????
>
>
>
>
> thanks for any of your ideas,
>
> george
>
> On 8/3/06, Thomas O'Hare <Tom at redtile.com> wrote:
> >
> > Hello All!
> >
> > I am using Dev-C++ in C++ mode to try and create an entry point into my
> > own DLL's based on the WinPCap Libraries.  I need to export several of
> > my own functions to languages that do not inherently support C typed
> > structures.
> >
> > I am looking for the cleanest, fasted way to create an entry point for
> > my functions so I can use the DLL as a true library for the programming
> > languages lacking native structure support.
> >
> > I can open DLL's in these languages and call functions, but especially
> > "chained" (Next) structures are very very tricky to work with in any
> > language that does not have native support for C typed structures.
> >
> > Any docs, resources, suggestions, etc, are welcome.
> > --
> >
> > Thanks,
> > ~ Thomas O'Hare ~
> > President, RedTile, Inc. - DBA: RedTile Software
> > Web, Wireless, Network, Database & Systems Software
> > +1.407.295.9148 ; +49.8651.717950 ; http://www.RedTile.Com/
> > Operations Manager; Virtual FoxPro User Group
> > Tom at VFUG.Org ; http://www.VFUG.Org/
> > _______________________________________________
> > Winpcap-users mailing list
> > Winpcap-users at winpcap.org
> > https://www.winpcap.org/mailman/listinfo/winpcap-users
> >
>
>  ------------------------------
>
> _______________________________________________
> Winpcap-users mailing list
> Winpcap-users at winpcap.org
> https://www.winpcap.org/mailman/listinfo/winpcap-users
>
>
> _______________________________________________
> Winpcap-users mailing list
> Winpcap-users at winpcap.org
> https://www.winpcap.org/mailman/listinfo/winpcap-users
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20060807/5e9d2034/attachment-0001.htm


More information about the Winpcap-users mailing list