Solved

How to use OWL class from lib or dll ?

Posted on 1997-08-04
2
237 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
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 how to count occurrences of each item in an array.

896 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

15 Experts available now in Live!

Get 1:1 Help Now