Solved

[Linker error] Unresolved external "..."

Posted on 2004-04-20
7
8,252 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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. …
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

636 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