[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Problem with libraries...

Posted on 1999-01-04
2
Medium Priority
?
227 Views
Last Modified: 2010-04-02
I am implementing some C++ program compiles to a DLL. Within this program I call a function from some library, which I specified the compiler to link to. However, I keep getting this error message during compile time:

Kermit.obj : error LNK2001: unresolved external symbol "int __cdecl broker(struct ETBCB *,char *,char *,char *)" (?broker@@YAHPAUETBCB@@PAD11@Z)

I am using Visual C++ 6.0 and created the project using the Win32 Dynamic Link Library project wizard as an empty project.

I checked and double-checked everything from environment variables, to case sensitivity etc. But it seems as if the problem is related to calling the broker() function, which is ?supposed? to reside in the broker32.lib, which I told the compiler to point to as a library.

Any ideas?
0
Comment
Question by:loyaliser
[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
2 Comments
 
LVL 23

Accepted Solution

by:
chensu earned 400 total points
ID: 1181505
You should use C linkage when you declare the broker function as follows.

extern "C" int broker(struct ETBCB *,char *,char *,char *);

or

extern "C"
{
#include "broker.h"
}

0
 
LVL 1

Author Comment

by:loyaliser
ID: 1181506
Thank you...
0

Featured Post

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!

Question has a verified solution.

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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

649 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