Hi all, this is an off topic question, but since I know that some of you are familiar with gcc, I am asking it here before signing up somewhere else. I have to source-compile one language (Modelica) to C++. Since Modelica has a structural subtype system, I'd like to create classes that way: //Modelica class Foo Real x; end Foo; //C++ template <Foo_Real> class Foo { Foo_Real x; } That means every generated class (and function for that matter) is (parametric) polymorphic and can be reused in other compilation units for subtypes. Unfortunately that also means, that I can only generate headers and no libraries or object files. Basically g++ plays the role of a linker for modelica. But this means that g++ will parse, check and compile every header again and again even if it's clear (at least after the first pass) that the code is sane. I've learned that the C++ standard delivers the export keyword to include template symbols in object files, but g++ does not support this. The closest thing I've seen to export would be precompiled headers. Unfortunately g++ also allows one single precompiled header per compilation unit. Does anyone know why? And is there any way to speed up the "linking" process a little (like letting g++ at least preprocess the headers or something like this)? thanks for any comments, Christoph
Attachment:
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
-- devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/devel