comp.lang.ada
 help / color / mirror / Atom feed
* Protected Type compiler complaint
@ 2014-07-07  7:15 NiGHTS
  2014-07-07  7:55 ` Simon Wright
  2014-07-07 19:06 ` framefritti
  0 siblings, 2 replies; 10+ messages in thread
From: NiGHTS @ 2014-07-07  7:15 UTC (permalink / 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!

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-07-08 17:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-07  7:15 Protected Type compiler complaint NiGHTS
2014-07-07  7:55 ` 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

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