From: "Gautier direct_replies_not_read" <gautier_niouzes@hotmail.com>
To: comp.lang.ada@ada.eu.org
Subject: Instanciation in a package spec.
Date: Wed, 22 Jan 2003 10:22:23 +0000
Date: 2003-01-22T10:22:23+00:00 [thread overview]
Message-ID: <mailman.13.1043231049.4961.comp.lang.ada@ada.eu.org> (raw)
In a package specification, I have:
generic
what: String;
package Ad_hoc is
function Last return String;
procedure Add;
procedure Put_Last;
end Ad_hoc;
package Ad_hoc_type is new Ad_hoc("type");
* ObjectAda 7.2.1 compiles it fine. But link fails:
pascalhe.obj : error LNK2001: unresolved external symbol
pascalhelp.default_instanciations__elab_bool
haddock.obj : error LNK2001: unresolved external symbol
pascalhelp.ad_hoc_type.add
haddock.obj : error LNK2001: unresolved external symbol
pascalhelp.ad_hoc_type.put_last
haddock.exe : fatal error LNK1120: 3 unresolved externals
* GNAT 3.15p issues:
pascalhe.ads:135:03: warning: cannot instantiate "Ad_hoc" before body seen
pascalhe.ads:135:03: warning: Program_Error will be raised at run time
Who is right ? Of course I would like to keep is as I've
programmed, although there is surely a workaround by making
a new package with the instanciations. I'd prefer to avoid it.
________________________________________________________
Gautier -- http://www.mysunrise.ch/users/gdm/gsoft.htm
NB: For a direct answer, e-mail address on the Web site!
_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail
next reply other threads:[~2003-01-22 10:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-22 10:22 Gautier direct_replies_not_read [this message]
2003-01-22 17:53 ` Instanciation in a package spec Martin Dowie
-- strict thread matches above, loose matches on Subject: below --
2003-01-22 10:48 Grein, Christoph
2003-01-22 16:54 ` Robert A Duff
2003-01-23 10:54 ` Jean-Pierre Rosen
2003-01-23 14:19 ` Robert A Duff
2003-01-23 15:13 ` Dmitry A. Kazakov
2003-01-23 16:23 ` Robert A Duff
2003-01-25 11:04 ` Dmitry A. Kazakov
2003-01-23 15:13 ` Jean-Pierre Rosen
2003-01-23 16:14 ` Robert A Duff
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox