[oclug] g++ linking question
gfranks at home.com
Mon Jan 29 12:45:16 EST 2001
>>>>> "David" == David F Skoll <dfs at roaringpenguin.com> writes:
David> On 27 Jan 2001, Greg Franks wrote:
>> You are using templates. G++ is really, really stupid when it
>> comes to these beasts. Look up the *info* pages (you do use
>> emacs, don't you), and start reading up.
>> Otherwise, use a real compiler.
David> You are a little harsh. G++ as of version 2.8.1 (I think)
David> handles template instantiation automatically just fine.
David> 2.7.2 does not; I wrote some horrible hacks to get that one
David> to work...
G++ still needs hacks. (including 2.9.?). The problem arises when
you use separate implementation and interface files (i.e., .cpp and
.h). You can simply #include the .cpp files where you need them (or
put everything in the .h file), and let the linker fix the mess
(Borland model), or get into all sorts of #pragma hacks.
If you really want a C++ compiler that does a good job, get the IBM
AIX xlC compiler. If you can compile C++ with *that* compiler, it
will compile anywhere.
__@ Greg Franks <| _~@ __O
_`\<,_ Ottawa, Ontario, Canada |O\ -^\<;^\<,
(*)/ (*) (*)--(*)%---/(*)
"Where do you want to go today?" Outside.
More information about the OCLUG