static variables in exported class having different values between dll and exe 
Author Message
 static variables in exported class having different values between dll and exe

I think when you export the template you must explicitly export a
static member too.

// Exports from the testdll.dll
typedef TESTDLL_API CTestdll<int> CTestInt;
TESTDLL_API int CTestInt::theData;

With best wishes,
    Igor Tandetnik



Fri, 02 Aug 2002 03:00:00 GMT  
 static variables in exported class having different values between dll and exe
The suggested code

Quote:
> TESTDLL_API int CTestInt::theData;

doesn't work.  You get a redefinition error.

Thanks for trying.

Geoff.

Quote:
----- Original Message -----

Newsgroups: microsoft.public.vc.language
Sent: Tuesday, February 15, 2000 12:10 PM
Subject: Re: static variables in exported class having different values
between dll and exe

> I think when you export the template you must explicitly export a
> static member too.

> // Exports from the testdll.dll
> typedef TESTDLL_API CTestdll<int> CTestInt;
> TESTDLL_API int CTestInt::theData;

> With best wishes,
>     Igor Tandetnik



Sat, 03 Aug 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. static variables in exported class having different values between dll and exe

2. Export static member variables in DLL

3. Problems with a DLL class having a string member variable

4. Exporting classes Vs compiling into different DLLs

5. dll export of static const class members

6. DLL static class function exports

7. Exporting class static data member from DLL( long )

8. Exporting static class member from DLL

9. Problems exporting class in static lib from a Win32 DLL when a copy constructor is defined

10. Export class in .EXE to be used by .DLL

11. exporting mfc classes in static dll

12. How do I export MFC classes from .exe, and call members from a Dll

 

 
Powered by phpBB® Forum Software