Solved

[Linker error] Unresolved external "..."

Posted on 2004-04-20
7
8,234 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 13

Expert Comment

by:SteH
Comment Utility
No objection.
0
 
LVL 9

Expert Comment

by:Cayce
Comment Utility
Yeah, No objection
0
 

Accepted Solution

by:
modulo earned 0 total points
Comment Utility
PAQ-ing the question and refunding 500  points

Thanks Cayce and SteH !

modulo

Community Support Moderator
Experts Exchange
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

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. …
Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

744 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

16 Experts available now in Live!

Get 1:1 Help Now