delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/06/29/19:03:00

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <42C3288D.4060107@atlantisvalley.com>
Date: Wed, 29 Jun 2005 18:02:37 -0500
From: Michael Swanson <ender AT atlantisvalley DOT com>
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
MIME-Version: 1.0
To: "Gerrit P. Haase" <gerrit AT familiehaase DOT de>
CC: cygwin AT cygwin DOT com
Subject: Re: Problem compiling simple Ada program
References: <42C2FFA2 DOT 6040600 AT atlantisvalley DOT com> <42C31A18 DOT 4070207 AT familiehaase DOT de>
In-Reply-To: <42C31A18.4070207@familiehaase.de>
X-IsSubscribed: yes
Note-from-DJ: This may be spam

Thanks for the solution.  Gnatmake seems to have fixed it.

Mike Swanson

Gerrit P. Haase wrote:
> *This message was transferred with a trial version of CommuniGate(tm) Pro*
> Michael Swanson wrote:
> 
>> I am trying to compile and link a simple Ada program on Cygwin.  The 
>> code for this looks like:
>> Hello.adb:
>>
>> with Text_IO;
>>
>> Procedure Hello is
>> begin
>>     Text_IO.Put_Line("Hello");
>> end;
>>
>> This compiles fine, but when I try to link the hello.o file, I get 
>> this error:
>> hello.o:hello.adb:(.text+0x18): undefined reference to 
>> '_ada__text_io__put_line__2'
>> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libcygwin.a(libcmain.o):: 
>> undefined reference to '_WinMain AT 16'
>> collect2: ld returned 1 exit status
>>
>> This looks like I don't have the right libraries for Ada, but I have 
>> installed the entire Devel and Lib group in Cygwin.  Is there a simple 
>> solution to this?  Thanks ahead of time for any help you can give me.
> 
> 
> Works for me(tm).
> 
> $ gnatmake HelloAda
> gcc -c HelloAda.adb
> gnatbind -x HelloAda.ali
> gnatlink HelloAda.ali
> 
> $ ./HelloAda
> Hello
> 
> 
> What are the commands you use?
> 
> Please post the outoput of `cygcheck -svr` *as attachment* to the list.
> 
> 
> Gerrit


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019