Andrei Thanks for your comments.
Andrei wrote: >> Jean-Philippe Barette-LaPierre wrote: >>> I don't see why it wouldn't be possible to have curlpp as a dynamic >>> library, since folks at my office are using it that way. I admit that they >>> are using it under linux but I don't see what would be the difference in >>> windows. >> How come? :) If they use it as a library (in fact doesn't matter wheather >> it's static or dynamic; the problem is the same) then make all inl files in >> their curlpp empty and let them compile and link their app. I think their >> app won't even compile anymore not to mention linking. > > 1. I think what you want is the "export template" C++ feature. For this > moment it is only exists as a "proof-of-concept" and is supported by > Comeau compiler only. IMHO it hardly appear as a standard feature at > least in close future. I know. > Think about templates as a piece of code which appears in your app's > header. This code is not "exported" from the library because it is not > instantiated there. > Think about the specialized template as a "normal" function which can be > defined in a library, so you might need some additional effort (like > dllexport/dllimport) to be exported from the library. That's why I propose to make additional source files with explicit instantiations to force code generation into the object files of curlpp. Right now you can't put curlpp into a library file. > 2. Mind that the 'folks' curlpp template stuff from shared libs in *nix. > On *nix all symbols are exported from the shared library by default > unless you hide some of them with a compiler-specific options. I think this doesn't matter here. As you pointed out it's a problem of weather code is generated and exists in a library object file or not. Visibility and name mangling have to be taken into account as well but I don't see any problems with these now. Regards Piotr Dobrogost _______________________________________________ cURLpp mailing list [email protected] http://www.rrette.com/mailman/listinfo/curlpp
