Solved

How to use OWL class from lib or dll ?

Posted on 1997-08-04
2
251 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Suggested Solutions

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…
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
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:
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:

856 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