Solved

How to use OWL class from lib or dll ?

Posted on 1997-08-04
2
246 Views
Last Modified: 2013-12-26
Title - How to use OWL class from lib or dll ?
Sdk - BC5/Win95

Hi

I've made a control by using OWL class (TControl ....), and i've put it in a static lib file (for exe).
Here is my header :
class       _MYCONTROLCLASS       Txxxxxx : public TControl
      {
      ..........
I compiled my sources in a dynamic way, replacing  _MYCONTROLCLASS  by _export.
And everything are ok.

To use my new lib file in another project, i replaced _MYCONTROLCLASS  by _import and the linking process told me : >>  Error: Unresolved external 'TWindow::Dispatch(TEventHandler::TEventInfo&,int,long)' referenced from module notetabx.cpp <<

What's wrong with my method  ?
Is there a method who also works with DLL ?

Thank you
Dan
0
Comment
Question by:mars
2 Comments
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 50 total points
ID: 1299331
If you're creating a library, you don't need to use _MYCONROLCLASS, so you should have

  #define _MYCONTROLCLASS

which sets it to nothing. What you are currently doing is ONLY needed when you want to create a DLL that supplies the definition of the class to a client.


0
 
LVL 2

Expert Comment

by:aleshka
ID: 1299332
Try to leave the _export tag in you exe too :) ( i.e. don't replace it with _import )

0

Featured Post

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Display recordset field HTML encoded 21 53
Form submit issue 11 85
API Soap Calls 4 117
Create animated movies for web page 18 45
This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
The viewer will learn how to count occurrences of each item in an array.
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…

803 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