Solved

How to use OWL class from lib or dll ?

Posted on 1997-08-04
2
225 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
Comment Utility
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
Comment Utility
Try to leave the _export tag in you exe too :) ( i.e. don't replace it with _import )

0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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 …
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

771 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

10 Experts available now in Live!

Get 1:1 Help Now