* Templates & cxx?
@ 1997-04-08 4:00 Jan Ekholm INF
1997-04-08 4:00 ` Marc Roussel
0 siblings, 1 reply; 2+ messages in thread
From: Jan Ekholm INF @ 1997-04-08 4:00 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1314 bytes --]
Has anybody got any information as to how templates are used under
Digital Unix 4.0 and cxx? Under Linux and gcc my program compiles and runs
just fine, but cxx gives me :
ld:
Unresolved:
List<Camera*>::List<Camera*>(void)
List<Camera*>::~List<Camera*>(void)
List<Camera*>::Insert(Camera*)
...
The 'List; class uses templates. It compiles quite nicely generating an
.o file, but when I link the main application with the file I get the
output above. When I compile the class using 'cxx' it creates a directory
named 'cxx_repository', which contains a lot of different files. Seems
like some kind of pre-instantiations?
Are there any nifty switches that can be used? The manpage is quite
unreadable (yes, I have read it) and doesn't help a lot.
The environment is an AlphaStation 500, Digital Unix 4.0 and cxx. On a
Linux it all works just fine.
I'd really appreciate any kind of help!
Best regards,
Jan 'Chakie' Ekholm
--
------------------------+-------------------------------------------------
Jan 'Chakie' Ekholm | CS at �bo Akademi University, Turku, Finland
School : jekholm@abo.fi \ Freelance-Programmer at Enator-Ryhm�
Work : je@enator.fi +------+ Powered by Linux since Fall '94
Home : chakie@mousehouse.abo.fi +---------------------------------------
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Templates & cxx?
1997-04-08 4:00 Templates & cxx? Jan Ekholm INF
@ 1997-04-08 4:00 ` Marc Roussel
0 siblings, 0 replies; 2+ messages in thread
From: Marc Roussel @ 1997-04-08 4:00 UTC (permalink / raw)
To: Jan Ekholm INF
Jan Ekholm INF wrote:
> Has anybody got any information as to how templates are used under
> Digital Unix 4.0 and cxx? Under Linux and gcc my program compiles and
> runs just fine, but cxx gives me :
>
> ld:
> Unresolved:
> List<Camera*>::List<Camera*>(void)
> List<Camera*>::~List<Camera*>(void)
> List<Camera*>::Insert(Camera*)
> ...
>
> The 'List; class uses templates. It compiles quite nicely generating
> an .o file, but when I link the main application with the file I get
> the output above.
Try the -define_templates compiler switch.
Marc R. Roussel
(roussel@henri.chem.uleth.ca)
Department of Chemistry
University of Lethbridge
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1997-04-08 4:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-04-08 4:00 Templates & cxx? Jan Ekholm INF
1997-04-08 4:00 ` Marc Roussel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox