[Linker error] Unresolved external "..."

I'm building a Win32 app using functions from WinPcap (http://winpcap.polito.it) to low-level access to Ethernet adapters.
I'm new to C++ Builder (i've ever used C over Linux), but i think it's almost right...

Everything compiles fine, but when linking i get the error:

------
[Linker error] Unresolved external '_PacketGetAdapterNames' referenced from \...path...\UNIT2.OBJ
------

I've installed both developers' pack and source code, but still there...

Can someone help?

Thanx all
LVL 1
KktoAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
moduloConnect With a Mentor Commented:
PAQ-ing the question and refunding 500  points

Thanks Cayce and SteH !

modulo

Community Support Moderator
Experts Exchange
0
 
SteHCommented:
You need a library with contains a function _PacketGetAdapterNames (). This is defined in packet32.h and is part of the packet.dll. So the code of the function is in an external file which won't be part of your executable. So the executable has to get to know how to call the function. Either link with packet.lib (or you need to load the dll and ask the function address from it to call it via a pointer set to that address).
0
 
CayceCommented:
You need to IMPLIB packet.dll, then use the resulting  .LIB file on your project. That will solve the problem.

command:
c:\> IMPLIB Packet.LIB PACKET.DLL

0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
KktoAuthor Commented:
Finally i found out...

packet.dll is  compiled with MS Visual C++, while i'm using Borland C++ Builder; and that's all the trick.

In this case a "translation" is needed to let Borland Builder understand the LIBs from MSVC. All the proccess is located at http://www.bcbdev.com/articles/vcdll.htm

Thanx for your tips :D
0
 
SteHCommented:
No objection.
0
 
CayceCommented:
Yeah, No objection
0
All Courses

From novice to tech pro — start learning today.