I have a program that is written in Ada, and I need to compile it. When I do so, I get a "does not contain expected unit" error, and it says it is expecting a spec but found a body. I need it compile it, and I don't know about Ada. I am using the gnat compiler. and i cant put any code up but i can say that it is a adb file with other ads files in the folder.
1
votes
1 Answers
1
votes
The error :
"does not contain expected unit"
usually occurs when the name of the unit does not match the file name (package body aaa.bbb needs to be in file aaa-bbb.adb and package aaa.bbb needs to be in aaa-bbb.ads)
"expecting a spec but found a body"
probably means you have a mismatch between the contents of the file and the file extension (ads or adb)
Beyond this i can only upvote the comment by Marc C