Exporting classes

I already have some code to capture the correct OS but I need an example showing me how to do this correctly because everything I have tried throws up a complaint by the compiler. Here is the code I have so far:
1
2
3
4
5
6
7
8
9
10
11
12
13
#ifdef xsDLL_BUILD
	#ifdef xsMSW
		#define xsDLL __declspec(dllexport)
	#else
		#define xsDLL
	#endif
#else
	#ifdef xsMSW
		#define xsDLL __declspec(dllimport)
	#else
		#define xsDLL
	#endif
#endif 

The example needs to show what will be in the header file and what will be in the source file and the example class must include at least one function.
Edit: If overloading the function is possible then can you show me that too, also need to see the con/destructors exportation
Edit: Never mind, found a resource( http://www.codeproject.com/Articles/28969/HowTo-Export-C-classes-from-a-DLL )
Last edited on
Topic archived. No new replies allowed.