Solved

Borland C++ 5.02

Posted on 2000-03-29
4
1,415 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Disabling automatic web page translations 9 48
Collapseable list of URLs. 10 130
Re-position the objects 7 109
Questions about this React unit test 4 62
Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
There are two main kinds of selectors in CSS: One is base selector like h1, h2, body, table or any existing HTML tags.  For instance, the following rule sets all paragraphs (<p> elements) to red: (CODE) CSS also allows us to define our own custom …
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

770 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