How to build a library from the C++ using template?

P

PengYu.UT

Hi,

I know I can use "export" to compile library from the source code using
templates. But I don't exactly know how to do it. Would you please give
me some hint?

Best wishes,
Peng
 
R

red floyd

Hi,

I know I can use "export" to compile library from the source code using
templates. But I don't exactly know how to do it. Would you please give
me some hint?

Best wishes,
Peng

Export is generally not implemented (except for EDG compilers).
 
G

Gianni Mariani

Hi,

I know I can use "export" to compile library from the source code using
templates. But I don't exactly know how to do it. Would you please give
me some hint?

The only compiler that I know of that supports this feature is the
Comeau C++ compiler. See http://www.comeaucomputing.com/.

Support for this feature extends the traditional scope of compiler
systems and hence has not been implemented in many products. (I think I
referred to it as a masochistic feature for C++ compiler developers.)

The alternative has been to put all the templates in the header files
and depend on the linker to allide multiple instantiations of template
instantiations.

G
 
R

red floyd

Roland said:
He obviously means Microsoft's __declspec(dllexport).
The short answer is: Don't do it!
The long answer may be given in a Microsoft newsgroup.
See also: http://support.microsoft.com/kb/q168958/

No he doesn't. He specifically referred to "export" and templates,
which is what export is defined for. How did you get that he was
looking for DLL export? He never once metioned DLLs.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top