Article View: comp.os.os2.programmer.misc
Article #297(Q) Templates: separate compilation with emx/gcc and OS/2
From: Tony Coates
Date: Fri, 18 Mar 1994 00:18
Date: Fri, 18 Mar 1994 00:18
27 lines
2529 bytes
2529 bytes
I am trying to get some template code working under g++ (emx 0.8g)
under OS/2 2.1. The templates work if I have the templates and code
in one big file which is all compiled at once. However, I wondered
what approach I should take when linking multiple object files
together. I expect that for each separate file, I could #include all
the template code, including the method implementations, but this
would mean having the same code repeated from module to module.
However, it also appears that the linker doesn't compile the code on
demand either if I try just compiling a template source file and
linking that in.
If anyone could explain to me the semantics of how template
specifications are converted into code with g++, and how one
includes/links this template code to the rest of the project, I would
be really grateful. I'm afraid I haven't found any texts/examples to
guide me, though maybe I wasn't looking in the right place.
Thanks in advance for any help that anyone can give to me,
Cheers,
Tony.
--
_____________________________________________________________________________
A.B.Coates, Dept. of Physics,
The University of Queensland QLD 4072 Australia.
Email: coates@physics.uq.oz.au
Phone: (07/+617) 365-3424 Fax: (07/+617) 365-1242
Disclaimer: The University is ignorant of my
opinions, let alone guilty ...
_____________________________________________________________________________
Technical Details
Message-ID:
<COATES.94Mar18001802@kelvin.physics.uq.oz.au>Path:
arc1-ca.pugleaf.net!gmd.de!xlink.net!news.ppp.de!lutzifer!news.rrz.uni-hamburg.de!news.dkrz.de!news.dfn.de!news.belwue.de!zib-berlin.de!netmbx.de!Germany.EU.net!EU.net!howland.reston.ans.net!agate!msuinfo!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!dingo.cc.uq.oz.au!coatesShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,fc0e323eac88ae3b,start X-Google-Attributes: gid109fba,public X-Google-Thread: 11307a,fc0e323eac88ae3b,start X-Google-Attributes: gid11307a,public X-Google-Thread: 10ba33,fc0e323eac88ae3b,start X-Google-Attributes: gid10ba33,public X-Google-ArrivalTime: 1994-03-18 00:18:02 PST Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!news.ppp.de!lutzifer!news.rrz.uni-hamburg.de!news.dkrz.de!news.dfn.de!news.belwue.de!zib-berlin.de!netmbx.de!Germany.EU.net!EU.net!howland.reston.ans.net!agate!msuinfo!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!dingo.cc.uq.oz.au!coates From: coates@kelvin.physics.uq.oz.au (Tony Coates) Newsgroups: comp.os.os2.programmer.misc,comp.lang.c++,gnu.g++.help Subject: (Q) Templates: separate compilation with emx/gcc and OS/2 Date: 18 Mar 94 00:18:02 Organization: Department of Physics, The University of Queensland Lines: 27 Distribution: world Message-ID: <COATES.94Mar18001802@kelvin.physics.uq.oz.au> Reply-To: coates@physics.uq.oz.au NNTP-Posting-Host: kelvin.physics.uq.oz.au