comp.lang.ada
 help / color / mirror / Atom feed
From: NiGHTS <nights@unku.us>
Subject: Protected Type compiler complaint
Date: Mon, 7 Jul 2014 00:15:57 -0700 (PDT)
Date: 2014-07-07T00:15:57-07:00	[thread overview]
Message-ID: <e17758fe-b230-4ef6-b144-d5a68e821915@googlegroups.com> (raw)

Subject: Protected Type compiler complaint
Platform: Linux (Kubuntu 14.04 32-bit)
Dev: GPS 5.0-16, GNAT 4.6


I am new to Ada and GPS so forgive me if my question seems silly. I have tried searching for the answer from various places for hours but for the life of me I can't even find a hint.

I have a very simple project in GPS with a "main" package and a "test" protected type. They occupy files with the same name and adb/ads extensions.

After creating my test files I went to the Menu "Project" -> "Edit Project Properties" -> "Source Files" tab. Then I added the test.adb & test.ads files where my protected type declarations are located. 

When I compile it complains that "protected declaration cannot be used as compilation unit" on line 1 of test.ads. So I remove those files from the project source files options menu. Then when I compile again it complains about "test.ads not found" on line 3 of main.adb.

Here is a summarized view of what my test.ads looks like:

   protected type Test is
       procedure DoSomething;
   end Test;

And here is a summarized view of what my main.adb looks like:

   with Test; use Test;

   procedure main is
   begin
       Test.DoSomething;
   end;

Any ideas what I might be doing wrong?


Thank you in advance for your help!

             reply	other threads:[~2014-07-07  7:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-07  7:15 NiGHTS [this message]
2014-07-07  7:55 ` Protected Type compiler complaint Simon Wright
2014-07-07 14:23   ` NiGHTS
2014-07-07 16:37     ` Adam Beneschan
2014-07-07 17:21     ` Simon Wright
2014-07-08 17:03     ` Shark8
2014-07-08 17:50       ` Anh Vo
2014-07-07 19:06 ` framefritti
2014-07-08  7:11   ` Georg Bauhaus
2014-07-08  7:53   ` Dmitry A. Kazakov
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox