LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-11-2003, 11:28 AM   #1
R2RO
Member
 
Registered: Dec 2001
Location: 64.5W 18.1N
Distribution: Red Hat 9.0
Posts: 79

Rep: Reputation: 15
My first ADA program using EMACS


Using RH9 and Emacs I tried to compile this program and I get "hello.ada: linker input file unused because linking not done". But if I save the ADA program (using Emacs) as "hello.a" it compiles and runs great. Any solutions?
 
Old 11-11-2003, 02:43 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Hmmmm .... not sure I can completely
understand the problem...

You are trying to compile from
within emacs? If you do, you still
need to save the file before running
the compiler ... emacs isn't going to
do that for you, and just spawns the
compiler in a sub-shell that then
operates on the recently saved file.

Cheers,
Tink
 
Old 11-11-2003, 07:16 PM   #3
R2RO
Member
 
Registered: Dec 2001
Location: 64.5W 18.1N
Distribution: Red Hat 9.0
Posts: 79

Original Poster
Rep: Reputation: 15
It was saved!
 
Old 11-11-2003, 07:50 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
How do you invoke it?

Cheers,
Tink
 
Old 11-11-2003, 08:28 PM   #5
R2RO
Member
 
Registered: Dec 2001
Location: 64.5W 18.1N
Distribution: Red Hat 9.0
Posts: 79

Original Poster
Rep: Reputation: 15
Ok , I do "gnatmake - k hello.ada" from the bottom (command line in Emacs). I also tried it from a terminal (console) using gcc -c hello.ada" obtaining the same results. Tried also changing the name to hello.ads and no lock! What I am going to do?????????????
 
Old 11-11-2003, 08:59 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
So, in your first post you said it works when
you save it and invoke the compiler manually.

Now you say it doesn't anymore?

I haven't got ADA installed, thus can't say
anything about how it is meant to be invoked,
but to me it looks like you're doing three different
things?
Quote:
But if I save the ADA program (using Emacs) as "hello.a" it compiles and runs great.
Quote:
"gnatmake - k hello.ada" from the bottom (command line in Emacs).
Quote:
I also tried it from a terminal (console) using gcc -c hello.ada"
Cheers,
Tink
 
Old 11-12-2003, 06:23 AM   #7
R2RO
Member
 
Registered: Dec 2001
Location: 64.5W 18.1N
Distribution: Red Hat 9.0
Posts: 79

Original Poster
Rep: Reputation: 15
N e v e r m i n d .
 
Old 11-12-2003, 03:51 PM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
I don't ... :)
Did you solve your problem?

Cheers,
Tink
 
Old 11-12-2003, 04:18 PM   #9
R2RO
Member
 
Registered: Dec 2001
Location: 64.5W 18.1N
Distribution: Red Hat 9.0
Posts: 79

Original Poster
Rep: Reputation: 15
I'll post the solution soon.
Thanks
 
Old 11-14-2003, 07:40 AM   #10
R2RO
Member
 
Registered: Dec 2001
Location: 64.5W 18.1N
Distribution: Red Hat 9.0
Posts: 79

Original Poster
Rep: Reputation: 15
Files should end with ".adb" extensions and not ".ada" (for the EMACCS I had been using). At the command line in EMACS application and when selecting "compile" from the menu this should appear " gnatmake" (no "-k" or anything else) and then you type next to it "hello.adb". However the default appears to be "make -k" when you select compile from the menu. How to make "gnatmake" to appear instead of "make -k"? See http://www.cs.buffalo.edu/~pventura/ADA/index.html#COMP

end of it!

 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I program in Emacs/Vim? coolblue Programming 5 07-29-2005 04:00 AM
Can ADA be used to produce an ASIC corbis_demon Programming 0 01-24-2005 07:54 AM
Missing ADA corbis_demon Linux - Newbie 1 07-05-2004 11:18 AM
no support for ADA corbis_demon Linux - Newbie 0 07-03-2004 10:17 AM
Debugging Ada programms gluon Programming 0 11-07-2001 04:19 AM


All times are GMT -5. The time now is 06:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration