Solved

[Linker error] Unresolved external "..."

Posted on 2004-04-20
7
8,237 Views
Last Modified: 2013-11-17
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
0
Comment
Question by:Kkto
7 Comments
 
LVL 13

Expert Comment

by:SteH
ID: 10869504
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
 
LVL 9

Expert Comment

by:Cayce
ID: 10869830
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
 
LVL 1

Author Comment

by:Kkto
ID: 10878755
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 13

Expert Comment

by:SteH
ID: 10880294
No objection.
0
 
LVL 9

Expert Comment

by:Cayce
ID: 10894545
Yeah, No objection
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 10894722
PAQ-ing the question and refunding 500  points

Thanks Cayce and SteH !

modulo

Community Support Moderator
Experts Exchange
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
importing  maven Project 5 258
notepad++ shortcuts 6 135
Change local server setting in php 6 81
How do I return the Android Studio to its default project window settings? 6 57
In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now