Click here to Skip to main content
16,006,065 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Linking error when using template class from MFC Extension DLL Pin
D.D. de Kerf10-Sep-01 21:48
D.D. de Kerf10-Sep-01 21:48 
GeneralRe: Linking error when using template class from MFC Extension DLL Pin
Ben M. Stokland10-Sep-01 22:24
Ben M. Stokland10-Sep-01 22:24 
GeneralRe: Linking error when using template class from MFC Extension DLL Pin
Tomasz Sowinski10-Sep-01 23:54
Tomasz Sowinski10-Sep-01 23:54 
GeneralRe: Linking error when using template class from MFC Extension DLL Pin
D.D. de Kerf11-Sep-01 0:06
D.D. de Kerf11-Sep-01 0:06 
GeneralRe: Linking error when using template class from MFC Extension DLL Pin
Tomasz Sowinski11-Sep-01 0:12
Tomasz Sowinski11-Sep-01 0:12 
GeneralRe: Linking error when using template class from MFC Extension DLL Pin
D.D. de Kerf11-Sep-01 0:16
D.D. de Kerf11-Sep-01 0:16 
GeneralRe: Linking error when using template class from MFC Extension DLL Pin
Tomasz Sowinski11-Sep-01 0:24
Tomasz Sowinski11-Sep-01 0:24 
GeneralRe: Linking error when using template class from MFC Extension DLL Pin
D.D. de Kerf11-Sep-01 22:54
D.D. de Kerf11-Sep-01 22:54 
>1) When you post code, replace > and < with > and <. The template arguments are
>lost without that - I had to view the HTML source to find out that you're using
>AFX_EXT_CLASS in template argument declaration. This isn't necessary.

Whoops. Sorry. Never thought of that. Pretty stupid of me.

>2) Template itself doesn't produce any code, so there's no need to export it. All
>information is in .h file, as you have already mentioned.

Right.

>3) Your template derives from non-template myClass_object. This class must be exported.

It was already exported, but it didn't seem to help. My theory about the whole messy situation is that template-classes can't be exported. I read somewhere else over at CodeGuru.com that the template construction is a compile-time trick and since the extension dll has already been compiled, it probably can't use any template classes.

I've solved the problem by repeating the code of the template class inside the .h-file that I distribute together with the .lib en .dll file. That way it is compiled both in the extension DLL and in the application that uses the dll. Not an ideal solution, but it works for now.

If anyone has valuable input about this situation, I'd love to hear it!

Thanks for all your help so far.


Dave




Structured programming vs. chaotic mind boggling
GeneralRe: Linking error when using template class from MFC Extension DLL Pin
Tomasz Sowinski12-Sep-01 0:36
Tomasz Sowinski12-Sep-01 0:36 
GeneralRe: Linking error when using template class from MFC Extension DLL Pin
D.D. de Kerf12-Sep-01 21:48
D.D. de Kerf12-Sep-01 21:48 
GeneralChanging a CEdit font!! Pin
GX10-Sep-01 20:46
GX10-Sep-01 20:46 
GeneralRe: Changing a CEdit font!! Pin
Michael Dunn10-Sep-01 21:39
sitebuilderMichael Dunn10-Sep-01 21:39 
GeneralRe: Changing a CEdit font!! Pin
GX11-Sep-01 1:47
GX11-Sep-01 1:47 
QuestionWhere do I find a DVD Decoder??? Pin
10-Sep-01 19:54
suss10-Sep-01 19:54 
GeneralMemory Management Pin
Pritesh Sidhdhapura10-Sep-01 18:58
Pritesh Sidhdhapura10-Sep-01 18:58 
GeneralRe: Memory Management Pin
Christian Graus10-Sep-01 19:17
protectorChristian Graus10-Sep-01 19:17 
GeneralRe: Memory Management Pin
Todd Smith10-Sep-01 20:04
Todd Smith10-Sep-01 20:04 
GeneralWin32 Security Programming Question Pin
the_grip10-Sep-01 18:16
the_grip10-Sep-01 18:16 
GeneralRe: Win32 Security Programming Question Pin
the_grip11-Sep-01 10:32
the_grip11-Sep-01 10:32 
Generalnetmeeting Pin
ac952_z_cn10-Sep-01 17:23
ac952_z_cn10-Sep-01 17:23 
GeneralLong lasting tooltip Pin
Darren Schroeder10-Sep-01 15:09
Darren Schroeder10-Sep-01 15:09 
GeneralRe: Long lasting tooltip Pin
Tomasz Sowinski10-Sep-01 23:49
Tomasz Sowinski10-Sep-01 23:49 
GeneralRe: Long lasting tooltip Pin
Darren Schroeder11-Sep-01 3:08
Darren Schroeder11-Sep-01 3:08 
GeneralRe: Long lasting tooltip Pin
Tomasz Sowinski11-Sep-01 3:30
Tomasz Sowinski11-Sep-01 3:30 
QuestionHow can pass a value to a property sheet? Pin
DanYELL10-Sep-01 14:41
DanYELL10-Sep-01 14:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.