0
votes

I am really confused when the GNAT keeps telling me that I have an undefined error when I try to import a package.

This is the where the error occurs in the source code:

with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;

procedure WordCount is

package ASU renames Ada.Strings.Unbounded;
use ASU;
package StringStack is new ProtectedStack(100, ASU.Unbounded_String);

It keeps telling me that the ProtectedStack is undefined. Since the ProtectedStack is provided, so I have to assume that this error is caused by mine... I just start to work with Ada. Could anyone please tell me how to solve this problem?

1

1 Answers

4
votes

You probably need to add with ProtectedStack;.