Solved

How to use OWL class from lib or dll ?

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

713 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