?
Solved

DLLs

Posted on 1998-08-06
2
Medium Priority
?
265 Views
Last Modified: 2010-04-02
How can we export an entire C++ class from a DLL. This can be done easily if we are using a a MFC dll but we do not want to extend an MFC dll. I suppose it can be done using
--declspec(dllexport) but then can this be used to export an entire class.
Please Help.
0
Comment
Question by:shayad
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
tuvi earned 150 total points
ID: 1169579
#define DllExport    __declspec( dllexport )

class DllExport C
{
  // ... your class definition
};

Samething applies for import.
0
 

Author Comment

by:shayad
ID: 1169580
The example is a bit too short. It would have been great if the example was continued to incorporate 'import' too.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

762 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