Solved

Borland C++ 5.02

Posted on 2000-03-29
4
1,407 Views
Last Modified: 2013-12-26
I need to implicitly link a dll with my exe in Borland C++ 5.02.

I have an example for Builder, and this does this(I beleave) with USELIB(..);
, however this is what I need, to do the same with BC++ 5.02 as USELIB does with Builder.

Error is caused by linker,
Unresolved External...    
0
Comment
Question by:ekinee
  • 2
4 Comments
 
LVL 14

Accepted Solution

by:
AlexVirochovsky earned 50 total points
ID: 2669658
It is same mechainique, but little other.
1. Make lib file with help of impdef/
implib : if this Borland DLL,
use direct implib, if MS: make beforehand def file with impdef and after that implib.
2. Include you lib file in you project.
3. Make h file with prototypes of
  DLL function and add in you cpp file.
4. Simple use MyDllFunction(..)

I hope, it helps. Alex
 
0
 
LVL 3

Expert Comment

by:JPM
ID: 2669964
AND don't forget to put inside Headers some code like this one :

#if defined  (MAKEDLL)
     #define _APPLI  __export
#elif defined (USEDLL)
    #define _APPLI  __import
#else
    #define _APPLI
#endif

and in IDE :  Options/Compiler/Defines
put   MAKEDLL                  for  the DLL
put   USEDLL                     for the EXE

Jean-Paul
0
 
LVL 3

Expert Comment

by:JPM
ID: 2669970
sorry i forgot something :
define your classes as :

class _APPLI  myclass.....
0
 

Author Comment

by:ekinee
ID: 2675895
I'm thanking.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Migrating to Exchange 2013 4 39
Read XML Response From ASP Classic 9 56
Tool to email me when a website changes 29 106
Microsoft Edge 9 80
This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
The viewer will learn how to dynamically set the form action using jQuery.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

706 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

12 Experts available now in Live!

Get 1:1 Help Now