[Bug 995] New: Template instantiations for std::string are missing in RTT typekit

http://bugs.orocos.org/show_bug.cgi?id=995

Summary: Template instantiations for std::string are missing in
RTT typekit
Product: Toolchain
Version: master
Platform: All
OS/Version: All
Status: NEW
Severity: major
Priority: P3
Component: RTT
AssignedTo: orocos-dev [..] ...
ReportedBy: meyer [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0

Created attachment 827
--> http://bugs.orocos.org/attachment.cgi?id=827
patch for rtt: cleaned up typekit and extern template declarations

Although the InputPort<T>, OutputPort<T>, Attribute<T> and Property<T> template
classes are declared as extern template for T = std::string in
typekit/Types.hpp they are not instantiated in RTT itself or the RTT typekit.
This leads to unresolved symbols when using them after having included the
Types.hpp header.

I therefore took some time to look through this whole extern template and
typekit stuff in RTT with a lot of nasty workarounds in it. The attached patch
tries(!) to clean up a little bit, but its not perfect at all. The most
important change is that I moved the extern declarations of template instances
used in RTT itself directly in the individual headers for DataSources, Ports,
Attributes and so on and instantiate them explicitly in the core library. The
typekit exports the remaining stuff, avoiding double instantiations. The
Types.hpp and RTTTypes.hpp headers can then just declare all available
instances as extern without having to care about the order of inclusions. I
checked for most of the symbols using the nm tool that they will be defined
either in the core library or in the typekit.

I would like to emphasize that I did not test the patch extensively, especially
not in non-ROS builds or with Corba, and probably did not understand all the
details. If you don't want to apply the whole patch, here are two minor issues
that IMHO should be fixed somehow beside the missing std::string
instantiations:

* The include guards for InputPort and OutputPort declarations in the typekit
headers are swapped.
* RTT.hpp does not include typekit/Types.hpp in contrast to what is written in
the header comment of Types.hpp. Adding the typekit header to RTT.hpp currently
breaks OCL, as OCL does not link the RTT typekit library.

[Bug 995] Template instantiations for std::string are missing in

[Bug 995] Template instantiations for std::string are missing in

http://bugs.orocos.org/show_bug.cgi?id=995

Peter Soetens <peter [..] ...> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |peter [..] ...