<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD-Dev] [TECHNICAL] How to generate pre-processor output (template problem). -->
<!--X-From-R13: Ayvire Xbjrgg <vprphorNvuht.pb.am> -->
<!--X-Date: Fri, 28 May 1999 19:40:48 -0700 -->
<!--X-Message-Id: Pine.LNX.3.96.990529142936.1126G-100000#agrajag,internal -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 374E16BC.46930065#cyberhighway,net -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Re: [MUD-Dev] [TECHNICAL] How to generate pre-processor outpu</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:icecube#ihug,co.nz">
</head>
<body background="/backgrounds/paperback.gif" bgcolor="#ffffff"
text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000">
<font size="+4" color="#804040">
<strong><em>MUD-Dev<br>mailing list archive</em></strong>
</font>
<br>
[ <a href="../">Other Periods</a>
| <a href="../../">Other mailing lists</a>
| <a href="/search.php3">Search</a>
]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->
Date:
[ <a href="msg00345.html">Previous</a>
| <a href="msg00347.html">Next</a>
]
Thread:
[ <a href="msg00347.html">Previous</a>
| <a href="msg00328.html">Next</a>
]
Index:
[ <A HREF="author.html#00346">Author</A>
| <A HREF="#00346">Date</A>
| <A HREF="thread.html#00346">Thread</A>
]
<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: [MUD-Dev] [TECHNICAL] How to generate pre-processor output (template problem).</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: "<A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A>" <<A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A>></LI>
<LI><em>Subject</em>: Re: [MUD-Dev] [TECHNICAL] How to generate pre-processor output (template problem).</LI>
<LI><em>From</em>: Oliver Jowett <<A HREF="mailto:icecube#ihug,co.nz">icecube#ihug,co.nz</A>></LI>
<LI><em>Date</em>: Sat, 29 May 1999 14:40:20 +1200 (NZST)</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Sender</em>: <A HREF="mailto:mud-dev-admin#kanga,nu">mud-dev-admin#kanga,nu</A></LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
On Thu, 27 May 1999, Ben Greear wrote:
> I added a cute little templated array class, and everything works like a charm
> on my egcs RH 6.0 Linux box. However, my primary mud server is BSD, and it's
> compiler is g++ 2.7.2. It gets all the way to the end and then complains about
> a missing symbol (*puke*). To add to the fun, its mangled so badly I haven't a
> real clue what it really is supposed to be. Also, I have neither root nor the
> permission to install a new compiler or any other useful software
> on the BSD box.
>
> The interesting thing is that it is listed as line 905 in a .h file that
> contains only about 100 lines. I imagine that is because the #include
> that pulls in the template class....
2.7.2 is really "interesting" to get working correctly with templates..
There are several possible ways to get it working; from memory we did:
- make sure that everything that uses the template pulls in the entire
template code (ie. you have to declare the whole template body in the
header)
- put a #pragma interface at the top of each template header
- have a file with #pragma implementation "somefile.h", #include
"somefile.h" lines for every template header you use
- in the body of that file, reference all the template instantiations you
need:
template class list<int>; // I think this is the syntax
template class map<String, SomeOtherObject>;
etc.
- compile everything with -fexternal-templates
Then, in theory, g++ should only generate non-inline template code in the
one place - the file with all the #pragma implementation lines. Maybe :)
I moved to using egcs a while back, which has its own set of template
peculiarities, so YMMV.
--
Oliver Jowett - icecube#ihug,co.nz - <A HREF="http://homepages.ihug.co.nz/~icecube/">http://homepages.ihug.co.nz/~icecube/</A>
KeyID: 1024/679D94C5 Fingerprint: CD94 5270 E2F4 339F 6A90 05C9 9DE4 EECC
_______________________________________________
MUD-Dev maillist - MUD-Dev#kanga,nu
<A HREF="http://www.kanga.nu/lists/listinfo/mud-dev">http://www.kanga.nu/lists/listinfo/mud-dev</A>
</PRE>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00331" HREF="msg00331.html">[MUD-Dev] [TECHNICAL] How to generate pre-processor output (template problem).</A></STRONG>
<UL><LI><EM>From:</EM> Ben Greear <greear#cyberhighway,net></LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00345.html">Re: [MUD-Dev] [TECHNICAL] How to generate pre-processor output (template problem).</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00347.html">Re: [MUD-Dev] [TECHNICAL] How to generate pre-processor output (template problem).</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00347.html">Re: [MUD-Dev] [TECHNICAL] How to generate pre-processor output (template problem).</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00328.html">[MUD-Dev] ScryMUD 1.9.3 released.</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00346"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00346"><STRONG>Thread</STRONG></A></LI>
</UL>
</LI>
</UL>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
<ul><li>Thread context:
<BLOCKQUOTE><UL>
<LI><STRONG>Re: [MUD-Dev] [TECHNICAL] [SOLVED] (template problem).</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<LI><strong><A NAME="00362" HREF="msg00362.html">Re: [MUD-Dev] [TECHNICAL] [SOLVED] (template problem).</A></strong>,
Ben Greear <a href="mailto:greear#cyberhighway,net">greear#cyberhighway,net</a>, Tue 01 Jun 1999, 00:05 GMT
</LI>
</ul>
<LI><strong><A NAME="00341" HREF="msg00341.html">Re: [MUD-Dev] [TECHNICAL] How to generate pre-processor output (template problem).</A></strong>,
Greg Miller <a href="mailto:gmiller#classic-games,com">gmiller#classic-games,com</a>, Sat 29 May 1999, 00:50 GMT
<UL>
<LI><strong><A NAME="00345" HREF="msg00345.html">Re: [MUD-Dev] [TECHNICAL] How to generate pre-processor output (template problem).</A></strong>,
Ben Greear <a href="mailto:greear#cyberhighway,net">greear#cyberhighway,net</a>, Sat 29 May 1999, 01:47 GMT
<UL>
<LI><strong><A NAME="00347" HREF="msg00347.html">Re: [MUD-Dev] [TECHNICAL] How to generate pre-processor output (template problem).</A></strong>,
Greg Miller <a href="mailto:gmiller#classic-games,com">gmiller#classic-games,com</a>, Sat 29 May 1999, 03:42 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
<LI><strong><A NAME="00346" HREF="msg00346.html">Re: [MUD-Dev] [TECHNICAL] How to generate pre-processor output (template problem).</A></strong>,
Oliver Jowett <a href="mailto:icecube#ihug,co.nz">icecube#ihug,co.nz</a>, Sat 29 May 1999, 02:40 GMT
</LI>
</ul>
</LI>
<LI><strong><A NAME="00328" HREF="msg00328.html">[MUD-Dev] ScryMUD 1.9.3 released.</A></strong>,
Ben Greear <a href="mailto:greear#cyberhighway,net">greear#cyberhighway,net</a>, Fri 28 May 1999, 00:54 GMT
<UL>
<LI><strong><A NAME="00334" HREF="msg00334.html">Re: [MUD-Dev] ScryMUD 1.9.3 released.</A></strong>,
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Fri 28 May 1999, 05:32 GMT
</LI>
</UL>
<UL>
<li><Possible follow-up(s)><br>
<LI><strong><A NAME="00329" HREF="msg00329.html">Re: [MUD-Dev] ScryMUD 1.9.3 released.</A></strong>,
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Fri 28 May 1999, 03:48 GMT
<UL>
<LI><strong><A NAME="00330" HREF="msg00330.html">Re: [MUD-Dev] ScryMUD 1.9.3 released.</A></strong>,
Ben Greear <a href="mailto:greear#cyberhighway,net">greear#cyberhighway,net</a>, Fri 28 May 1999, 04:37 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</UL></BLOCKQUOTE>
</ul>
<hr>
<center>
[ <a href="../">Other Periods</a>
| <a href="../../">Other mailing lists</a>
| <a href="/search.php3">Search</a>
]
</center>
<hr>
</body>
</html>