comp.lang.ada
 help / color / mirror / Atom feed
* texttools and standard library packages
@ 2013-12-11  2:25 agent
  2013-12-11 12:48 ` Niklas Holsti
  2013-12-15 22:05 ` koburtch
  0 siblings, 2 replies; 20+ messages in thread
From: agent @ 2013-12-11  2:25 UTC (permalink / raw)


I am a total newbie in regards to Ada, but have been using stony brook
modula2 for many years.

I am trying to use the source texttools-2-1-0 and to compile the
ttdemo program.  I am getting an error saying that To255 is undefined.
I cannot find where this is.

Where do I look, or what library to I have to import (with,use)?

Also, it would be very helpful for me to have a listing of all
packages and procedures/functions in all the included libraries. Where
would I find such a list that is easily searchable?

Thanks

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

* Re: texttools and standard library packages
  2013-12-11  2:25 texttools and standard library packages agent
@ 2013-12-11 12:48 ` Niklas Holsti
  2013-12-12 12:34   ` agent
  2013-12-15 22:05 ` koburtch
  1 sibling, 1 reply; 20+ messages in thread
From: Niklas Holsti @ 2013-12-11 12:48 UTC (permalink / raw)


On 13-12-11 04:25 , agent@drrob1.com wrote:
> I am a total newbie in regards to Ada, but have been using stony brook
> modula2 for many years.
> 
> I am trying to use the source texttools-2-1-0 and to compile the
> ttdemo program.  I am getting an error saying that To255 is undefined.
> I cannot find where this is.
> 
> Where do I look, or what library to I have to import (with,use)?

After downloading texttools-2-1-0 (from
http://www.pegasoft.ca/downloads/), it seems that all occurrences of
"To255" are in comments, and there is no "ttdemo" example. This suggests
to me that "To255" was a feature of an earlier version of texttools, and
that "ttdemo" has not been updated to work with version 2.1.0. The
README file says this:

-- quote from texttools-2-1-0 README:
Version 2.1.0 has a new ... conversion from bounded strings to unbounded
strings.  The gen_list generic linked list package has been
deprecated in favour of the standard Ada list packages introduced in Ada
2005.

TIA 1.2.2 will not build with Texttools 2.1.0 due to these changes.
-- end quote

You could try some of the other example programs included in the
texttools-2-1-0 installation kit. Presumably, these should work with
this version of texttools; at least they do not use "To255".

I don't know if this is the same "ttdemo" program that you are using,
but there is a "ttdemo" at
http://beru.univ-brest.fr/~singhoff/DOC/LANG/ADA/BOOK/15.html, in which
To255 occurs for the first time in this statement:

  OpenWindow( To255( "Demo Window" ), -- title at top of window
     0, 0, 78, 23,          -- the coordinates of the window
     Style      => normal,  -- type of window, usually "normal"
     HasInfoBar => true );  -- true if control information is

Looking at the declaration of OpenWindow in package Windows
(windows.ads), the first parameter should now be an ordinary String:

   procedure OpenWindow( title : in String ; l, t, r, b : integer;
          Style : AWindowStyle := Normal; HasInfoBar : boolean := false;
          CallBack : AWindowDrawingCallBack := null );

Probably you could just remove all occurrences of To255(), and change
the first line of the statement to

  OpenWindow( "Demo Window",  -- title at top of window


-- 
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
      .      @       .

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

* Re: texttools and standard library packages
  2013-12-11 12:48 ` Niklas Holsti
@ 2013-12-12 12:34   ` agent
  2013-12-12 17:44     ` Niklas Holsti
  0 siblings, 1 reply; 20+ messages in thread
From: agent @ 2013-12-12 12:34 UTC (permalink / raw)


On Wed, 11 Dec 2013 14:48:38 +0200, Niklas Holsti
<niklas.holsti@tidorum.invalid> wrote:

>On 13-12-11 04:25 , agent@drrob1.com wrote:
>> I am a total newbie in regards to Ada, but have been using stony brook
>> modula2 for many years.
>> 
>> I am trying to use the source texttools-2-1-0 and to compile the
>> ttdemo program.  I am getting an error saying that To255 is undefined.
>> I cannot find where this is.
>> 
>> Where do I look, or what library to I have to import (with,use)?
>
>After downloading texttools-2-1-0 (from
>http://www.pegasoft.ca/downloads/), it seems that all occurrences of
>"To255" are in comments, and there is no "ttdemo" example. This suggests
>to me that "To255" was a feature of an earlier version of texttools, and
>that "ttdemo" has not been updated to work with version 2.1.0. The
>README file says this:
>
>-- quote from texttools-2-1-0 README:
>Version 2.1.0 has a new ... conversion from bounded strings to unbounded
>strings.  The gen_list generic linked list package has been
>deprecated in favour of the standard Ada list packages introduced in Ada
>2005.
>
>TIA 1.2.2 will not build with Texttools 2.1.0 due to these changes.
>-- end quote
>
>You could try some of the other example programs included in the
>texttools-2-1-0 installation kit. Presumably, these should work with
>this version of texttools; at least they do not use "To255".
>
>I don't know if this is the same "ttdemo" program that you are using,
>but there is a "ttdemo" at
>http://beru.univ-brest.fr/~singhoff/DOC/LANG/ADA/BOOK/15.html, in which
>To255 occurs for the first time in this statement:
>
>  OpenWindow( To255( "Demo Window" ), -- title at top of window
>     0, 0, 78, 23,          -- the coordinates of the window
>     Style      => normal,  -- type of window, usually "normal"
>     HasInfoBar => true );  -- true if control information is
>
>Looking at the declaration of OpenWindow in package Windows
>(windows.ads), the first parameter should now be an ordinary String:
>
>   procedure OpenWindow( title : in String ; l, t, r, b : integer;
>          Style : AWindowStyle := Normal; HasInfoBar : boolean := false;
>          CallBack : AWindowDrawingCallBack := null );
>
>Probably you could just remove all occurrences of To255(), and change
>the first line of the statement to
>
>  OpenWindow( "Demo Window",  -- title at top of window



I don't remember where ttdemo came from.  Perhaps an earlier version
ot the texttools.  So I decided to use uio_ and uio2_ programs.  These
compiled.  But generated lots of linker unresolved symbol errors.  The
commandline I used was:

gnatmake -g -gnatf -gnato -fstack-check -gnatVa -gnatwu -gnat2012 -lm
-lncurses

How do I resolve those?

Thanks for your help


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

* Re: texttools and standard library packages
  2013-12-12 12:34   ` agent
@ 2013-12-12 17:44     ` Niklas Holsti
  2013-12-12 18:00       ` Dmitry A. Kazakov
  0 siblings, 1 reply; 20+ messages in thread
From: Niklas Holsti @ 2013-12-12 17:44 UTC (permalink / raw)


On 13-12-12 14:34 , agent@drrob1.com wrote:
> So I decided to use uio_ and uio2_ programs.  These
> compiled.  But generated lots of linker unresolved symbol errors.  The
> commandline I used was:
> 
> gnatmake -g -gnatf -gnato -fstack-check -gnatVa -gnatwu -gnat2012 -lm
> -lncurses

If you want to specify more (non-Ada) libraries to be linked into your
Ada program, you should either use the pragma Linker_Options in the Ada
source files or put the linker options in the gnatmake command _after_
the gnatmake option -largs. At least, as I understand it.

Here is what I did, just to see how I could make it work (I don't use
texttools in my own programs). I'm on a Mac (Darwin Kernel Version
12.5.0). The texttools kit comes with some Makefiles and GNAT project
files, but I am used to doing things with less automated methods; others
on c.l.a can perhaps help you use the Makefiles and project files.

1. I went to the examples folder and compiled the C modules as follows:

   gcc -c -g -O2 ../src/curses.c
   gcc -c -g -O2 ../src/system.c

To make the compilation succeed, I had to edit system.c to change the
line #include <wait.h> to #include <sys/wait.h>.

The result of this compilation is curses.o and system.o in the examples
folder.

2. I built the "basic" example using this gnatmake command:

   gnatmake -g -O2 basic.adb -largs system.o curses.o -lncurses

This compiles the necessary Ada modules, "binds" the Ada program, and
then links the Ada and C modules. The last two lines from the gnatmake
command show what happens (these lines are generated by gnatmake, not
commands that I entered myself):

   gnatbind -x basic.ali
   gnatlink basic.ali -g system.o curses.o -lncurses

The result is a slew of .ali and .o files, and the executable "basic".

3. I test the "basic" demo with the command

  ./basic

This changes the terminal window to white-on-black, fills most of the
window with some strange symbol (I don't know if that is intentional),
draws a white-on-blue box labelled "Basic Window" in the upper left
corner of the screen, which shows some text, and then terminates when I
press some key on the keyboard, as the demo seems intended to do. The
terminal window is restored to my default settings (black-on-white,
etc.) So this "basic" demo seems to work.

However, if I do the same with the uio2_demo, the terminal changes to
white-on-black as above, but then a NAME_ERROR exception happens in the
demo, which terminates without restoring the terminal window to
black-on-white. I haven't debugged this further; it may be a problem
just in this demo.

(In my copy of texttools, the uio_demo has all its statements commented
out, and is just a null procedure. Some demo...)

I hope this helps you get further.

-- 
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
      .      @       .



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

* Re: texttools and standard library packages
  2013-12-12 17:44     ` Niklas Holsti
@ 2013-12-12 18:00       ` Dmitry A. Kazakov
  2013-12-16  0:43         ` agent
  0 siblings, 1 reply; 20+ messages in thread
From: Dmitry A. Kazakov @ 2013-12-12 18:00 UTC (permalink / raw)


On Thu, 12 Dec 2013 19:44:58 +0200, Niklas Holsti wrote:

> On 13-12-12 14:34 , agent@drrob1.com wrote:
>> So I decided to use uio_ and uio2_ programs.  These
>> compiled.  But generated lots of linker unresolved symbol errors.  The
>> commandline I used was:
>> 
>> gnatmake -g -gnatf -gnato -fstack-check -gnatVa -gnatwu -gnat2012 -lm
>> -lncurses
> 
> If you want to specify more (non-Ada) libraries to be linked into your
> Ada program, you should either use the pragma Linker_Options in the Ada
> source files or put the linker options in the gnatmake command _after_
> the gnatmake option -largs. At least, as I understand it.

Or, much better, create an externally-built library project, e.g.

project Curses is
   for Externally_Built use "true";
   for Source_Files use ();
   for Library_Dir use "/usr/lib"; -- For example
   for Library_Name use "ncurses";
   for Library_Kind use "dynamic"; -- When linking to a shared library
end Curses;

and use it with your project.

GNAT will do anything needed to link to the library. This includes adding
messy prefixes like "lib" on Linux targets, choosing appropriate file type,
*.dll, *.so, *.lib, *.a etc. Note also that this is transitive. If your
project is itself a library project = may not have linker options by
itself, a third project will nevertheless inherit linker options from
Curses through it.

[pragma Linker_Options is the worst of all three]

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


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

* Re: texttools and standard library packages
  2013-12-11  2:25 texttools and standard library packages agent
  2013-12-11 12:48 ` Niklas Holsti
@ 2013-12-15 22:05 ` koburtch
  2013-12-22 19:24   ` koburtch
  1 sibling, 1 reply; 20+ messages in thread
From: koburtch @ 2013-12-15 22:05 UTC (permalink / raw)


On Tuesday, December 10, 2013 9:25:37 PM UTC-5, ag...@drrob1.com wrote:
> I am a total newbie in regards to Ada, but have been using stony brook
> 
> modula2 for many years.
> 
> I am trying to use the source texttools-2-1-0 and to compile the
> 
> ttdemo program.  I am getting an error saying that To255 is undefined.
> 
> I cannot find where this is.
> 
> 
> 
> Where do I look, or what library to I have to import (with,use)?
> 
> 
> 
> Also, it would be very helpful for me to have a listing of all
> 
> packages and procedures/functions in all the included libraries. Where
> would I find such a list that is easily searchable?
> 
> 
> 
> Thanks

I don't read this group often.  I noticed your message.

Texttools was taken over by Nicholas Boulenguez.  In his latest version, he made major changes to the structure.  This included renaming the functions, converting everything to Ada 2005 containers and unbounded strings.

The To255 function was in the older version of Texttools.  It converts a fixed string to an 255 character bounded string.  Nicholas' changes replaced bounded strings with unbounded strings.

If you need To255, you should try version 2.0.7, which is on the Pegasoft web site.

If you have specific questions about Texttools, you should email Nicholas, or contact me through the Pegasoft website and I will forward your questions to him.

Regards,
Ken Burtch

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

* Re: texttools and standard library packages
  2013-12-12 18:00       ` Dmitry A. Kazakov
@ 2013-12-16  0:43         ` agent
  2013-12-16  1:11           ` Ludovic Brenta
  2013-12-16  8:18           ` Dmitry A. Kazakov
  0 siblings, 2 replies; 20+ messages in thread
From: agent @ 2013-12-16  0:43 UTC (permalink / raw)


On Thu, 12 Dec 2013 19:00:16 +0100, "Dmitry A. Kazakov"
<mailbox@dmitry-kazakov.de> wrote:

> On 13-12-12 14:34 , agent@drrob1.com wrote:
> So I decided to use uio_ and uio2_ programs.  These
> compiled.  But generated lots of linker unresolved symbol errors.  The
> commandline I used was:
> 
> gnatmake -g -gnatf -gnato -fstack-check -gnatVa -gnatwu -gnat2012 -lm \
> -lncurses
> 
> If you want to specify more (non-Ada) libraries to be linked into your
> Ada program, you should either use the pragma Linker_Options in the Ada
> source files or put the linker options in the gnatmake command _after_
> the gnatmake option -largs. At least, as I understand it.
>
>Or, much better, create an externally-built library project, e.g.
>
>project Curses is
>   for Externally_Built use "true";
>   for Source_Files use ();
>   for Library_Dir use "/usr/lib"; -- For example
>   for Library_Name use "ncurses";
>   for Library_Kind use "dynamic"; -- When linking to a shared library
>end Curses;
>
>and use it with your project.
>
>GNAT will do anything needed to link to the library. This includes adding
>messy prefixes like "lib" on Linux targets, choosing appropriate file type,
>*.dll, *.so, *.lib, *.a etc. Note also that this is transitive. If your
>project is itself a library project = may not have linker options by
>itself, a third project will nevertheless inherit linker options from
>Curses through it.
>
>[pragma Linker_Options is the worst of all three]


I appreciate the help a lot.  As a long-time modula-2 user, I
attempted to use gm2.  But I received NO help when I posted issues to
the mailinglist.  So I abandoned that and figured I'd try Ada and
getting help from here.

I attempted to follow the instructions regarding an externally-built
library project.  But I got hung up in not having any source for a
library project, and even if I could get this to compile, I do not
know how to use a library I built myself.  So I abandoned the project
approach.

But I was able to get the basic.adb example to run.  Oddly, it
complained that it needed libtinfo.so.5 and it actually told me where
it was.  To bad it could not then pull it in automatically since it
knew where it was.  But this line worked:

gnatmake -g -O2 basic.adb -largs system.o curses.o /lib/libtinfo.so.5
-lm -lncurses

I dumped everything into 1 directory so this worked.  Now I'll play a
little more

Thanks again


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

* Re: texttools and standard library packages
  2013-12-16  0:43         ` agent
@ 2013-12-16  1:11           ` Ludovic Brenta
  2013-12-16  1:38             ` agent
  2013-12-16  8:18           ` Dmitry A. Kazakov
  1 sibling, 1 reply; 20+ messages in thread
From: Ludovic Brenta @ 2013-12-16  1:11 UTC (permalink / raw)


agent@drrob1.com writes on comp.lang.ada:
> I attempted to follow the instructions regarding an externally-built
> library project.  But I got hung up in not having any source for a
> library project, and even if I could get this to compile, I do not
> know how to use a library I built myself.  So I abandoned the project
> approach.
>
> But I was able to get the basic.adb example to run.  Oddly, it
> complained that it needed libtinfo.so.5 and it actually told me where
> it was.  To bad it could not then pull it in automatically since it
> knew where it was.  But this line worked:
>
> gnatmake -g -O2 basic.adb -largs system.o curses.o /lib/libtinfo.so.5
> -lm -lncurses
>
> I dumped everything into 1 directory so this worked.  Now I'll play a
> little more


I'm not sure exactly what you are trying to achieve: write a program
that uses TextTools, or work on TextTools themselves.  Because you could
avoid the compiling and linking problems entirely by using the prebuilt
TextTools from Debian (also available in most derivatives):

aptitude install libtexttools3-dev

and read /usr/share/ada/adainclude/texttools.gpr to learn how to use the
library in your programs.

Then you could concentrate on your own programming.

-- 
Ludovic Brenta.

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

* Re: texttools and standard library packages
  2013-12-16  1:11           ` Ludovic Brenta
@ 2013-12-16  1:38             ` agent
  0 siblings, 0 replies; 20+ messages in thread
From: agent @ 2013-12-16  1:38 UTC (permalink / raw)


On Mon, 16 Dec 2013 02:11:37 +0100, Ludovic Brenta
<ludovic@ludovic-brenta.org> wrote:

>agent@drrob1.com writes on comp.lang.ada:
>> I attempted to follow the instructions regarding an externally-built
>> library project.  But I got hung up in not having any source for a
>> library project, and even if I could get this to compile, I do not
>> know how to use a library I built myself.  So I abandoned the project
>> approach.
>>
>> But I was able to get the basic.adb example to run.  Oddly, it
>> complained that it needed libtinfo.so.5 and it actually told me where
>> it was.  To bad it could not then pull it in automatically since it
>> knew where it was.  But this line worked:
>>
>> gnatmake -g -O2 basic.adb -largs system.o curses.o /lib/libtinfo.so.5
>> -lm -lncurses
>>
>> I dumped everything into 1 directory so this worked.  Now I'll play a
>> little more
>
>
>I'm not sure exactly what you are trying to achieve: write a program
>that uses TextTools, or work on TextTools themselves.  Because you could
>avoid the compiling and linking problems entirely by using the prebuilt
>TextTools from Debian (also available in most derivatives):
>
>aptitude install libtexttools3-dev
>
>and read /usr/share/ada/adainclude/texttools.gpr to learn how to use the
>library in your programs.
>
>Then you could concentrate on your own programming.

I am interested in using texttools, so the prebuilt tools are an
excellent option for me.  If only I knew ...

Thanks


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

* Re: texttools and standard library packages
  2013-12-16  0:43         ` agent
  2013-12-16  1:11           ` Ludovic Brenta
@ 2013-12-16  8:18           ` Dmitry A. Kazakov
  2013-12-16  9:23             ` Simon Wright
  1 sibling, 1 reply; 20+ messages in thread
From: Dmitry A. Kazakov @ 2013-12-16  8:18 UTC (permalink / raw)


On Sun, 15 Dec 2013 19:43:18 -0500, agent@drrob1.com wrote:

> I attempted to follow the instructions regarding an externally-built
> library project.  But I got hung up in not having any source for a
> library project, and even if I could get this to compile, I do not
> know how to use a library I built myself.

Library project is needed if your project has be a library. My post was
about how to link to a pre-existing non-Ada library. There are three ways:

1. pragma Linker_Options somewhere in the sources

2. An explicit specification of the library in linker (e.g. -L and -largs
options of gnatmake)

3. Using a project describing the library

> So I abandoned the project approach.

Which is sad, because if you are using external libraries in your
application, that would make it very difficult to build, as you already
encountered.

I think anybody here could point one or more projects they were unable to
use because of broken makefiles and other unusable stuff. Using GNAT
project would solve most if not all issues.

If the library you need is already packaged as Ludovic suggested, then all
you need is to use its project file in your project:

with "the_library_i_need.gpr";
project Basic is
   for Main use "basic.adb";   
end Basic;

$ gnatmake -Pmy_project.gpr

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

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

* Re: texttools and standard library packages
  2013-12-16  8:18           ` Dmitry A. Kazakov
@ 2013-12-16  9:23             ` Simon Wright
  2013-12-19  1:40               ` agent
  0 siblings, 1 reply; 20+ messages in thread
From: Simon Wright @ 2013-12-16  9:23 UTC (permalink / raw)


"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:

> If the library you need is already packaged as Ludovic suggested, then
> all you need is to use its project file in your project:
>
> with "the_library_i_need.gpr";
> project Basic is
>    for Main use "basic.adb";   
> end Basic;
>
> $ gnatmake -Pmy_project.gpr

That would give you a warning; the project file name should be the same
as the name of the project, so here it should be basic.gpr.

This is, I believe, case-insensitive.


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

* Re: texttools and standard library packages
  2013-12-16  9:23             ` Simon Wright
@ 2013-12-19  1:40               ` agent
  2013-12-19  8:57                 ` Simon Wright
  0 siblings, 1 reply; 20+ messages in thread
From: agent @ 2013-12-19  1:40 UTC (permalink / raw)


On Mon, 16 Dec 2013 09:23:26 +0000, Simon Wright <simon@pushface.org>
wrote:

>"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:
>
>> If the library you need is already packaged as Ludovic suggested, then
>> all you need is to use its project file in your project:
>>
>> with "the_library_i_need.gpr";
>> project Basic is
>>    for Main use "basic.adb";   
>> end Basic;
>>
>> $ gnatmake -Pmy_project.gpr
>
>That would give you a warning; the project file name should be the same
>as the name of the project, so here it should be basic.gpr.
>
>This is, I believe, case-insensitive.


I have been able to compile trivial examples using a project file, so
I have now attempted to compile the examples from the texttools.  I
started with basic.adb

with "texttools";
project Debug is
  for Source_Files use ("basic.adb");
  for Source_Dirs use ("./**"); 
  for Object_Dir use "debug";
  for Main use ("basic");  

  package Builder is
    for Default_Switches ("Ada")
        use ("-g");
    for Executable ("basic") use "test";
  end Builder;

  package Compiler is
    for Default_Switches ("Ada")
       use ("-fstack-check",
            "-gnatVa",
            "-g",
            "-gnato",
            "-gnatf",
            "-gnatwu",
            "-gnat2012");
  end Compiler;
   
  package Linker is
    for Default_Switches ("Ada")
        use ("-C",
             "-lm",
             "-lncurses"
            );
  end Linker;
end Debug;

and I did
  gnatmake -Pdebug

I am now getting this error:  "gnatlink: failed to open binder output"

What should I try now?

Thanks guys for all your help

--rob


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

* Re: texttools and standard library packages
  2013-12-19  1:40               ` agent
@ 2013-12-19  8:57                 ` Simon Wright
  2013-12-19 12:59                   ` agent
  0 siblings, 1 reply; 20+ messages in thread
From: Simon Wright @ 2013-12-19  8:57 UTC (permalink / raw)


agent@drrob1.com writes:

>   package Linker is
>     for Default_Switches ("Ada")
>         use ("-C",
>              "-lm",
>              "-lncurses"
>             );
>   end Linker;
> end Debug;
>
> and I did
>   gnatmake -Pdebug
>
> I am now getting this error:  "gnatlink: failed to open binder output"

Where did the -C switch come from in package Linker?

   $ gnatlink -C
   gnatlink: -C.ali not found

(on the other hand, I just tried with one of my own GPRs and the command
line that gnatmake successfully passed to gnatlink was

   gnatlink foo.ali -C -o foo

The -C didn't get passed to the system linker.



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

* Re: texttools and standard library packages
  2013-12-19  8:57                 ` Simon Wright
@ 2013-12-19 12:59                   ` agent
  2013-12-20  1:46                     ` agent
  0 siblings, 1 reply; 20+ messages in thread
From: agent @ 2013-12-19 12:59 UTC (permalink / raw)


On Thu, 19 Dec 2013 08:57:11 +0000, Simon Wright <simon@pushface.org>
wrote:

>agent@drrob1.com writes:
>
>>   package Linker is
>>     for Default_Switches ("Ada")
>>         use ("-C",
>>              "-lm",
>>              "-lncurses"
>>             );
>>   end Linker;
>> end Debug;
>>
>> and I did
>>   gnatmake -Pdebug
>>
>> I am now getting this error:  "gnatlink: failed to open binder output"
>
>Where did the -C switch come from in package Linker?
>
>   $ gnatlink -C
>   gnatlink: -C.ali not found
>
>(on the other hand, I just tried with one of my own GPRs and the command
>line that gnatmake successfully passed to gnatlink was
>
>   gnatlink foo.ali -C -o foo
>
>The -C didn't get passed to the system linker.

This is the full output from that attempt

gnatbind -shared -I- -x /home/rob/Ada/tt/debug/basic.ali

gnatlink /home/rob/Ada/tt/debug/basic.ali -shared-libgcc -g -C -lm
-lncurses -L/usr/lib/x86_64-linux-gnu/ -ltexttools -o 

/home/rob/Ada/tt/debug/test
gnatmake: *** link failed.

gnatlink: Failed to open binder output

I see the -C in there, but I don't know what it does


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

* Re: texttools and standard library packages
  2013-12-19 12:59                   ` agent
@ 2013-12-20  1:46                     ` agent
  0 siblings, 0 replies; 20+ messages in thread
From: agent @ 2013-12-20  1:46 UTC (permalink / raw)


On Thu, 19 Dec 2013 07:59:44 -0500, agent@drrob1.com wrote:

>On Thu, 19 Dec 2013 08:57:11 +0000, Simon Wright <simon@pushface.org>
>wrote:
>
>>agent@drrob1.com writes:
>>
>>>   package Linker is
>>>     for Default_Switches ("Ada")
>>>         use ("-C",
>>>              "-lm",
>>>              "-lncurses"
>>>             );
>>>   end Linker;
>>> end Debug;
>>>
>>> and I did
>>>   gnatmake -Pdebug
>>>
>>> I am now getting this error:  "gnatlink: failed to open binder output"
>>
>>Where did the -C switch come from in package Linker?
>>
>>   $ gnatlink -C
>>   gnatlink: -C.ali not found
>>
>>(on the other hand, I just tried with one of my own GPRs and the command
>>line that gnatmake successfully passed to gnatlink was
>>
>>   gnatlink foo.ali -C -o foo
>>
>>The -C didn't get passed to the system linker.
>
>This is the full output from that attempt
>
>gnatbind -shared -I- -x /home/rob/Ada/tt/debug/basic.ali
>
>gnatlink /home/rob/Ada/tt/debug/basic.ali -shared-libgcc -g -C -lm
>-lncurses -L/usr/lib/x86_64-linux-gnu/ -ltexttools -o 
>
>/home/rob/Ada/tt/debug/test
>gnatmake: *** link failed.
>
>gnatlink: Failed to open binder output
>
>I see the -C in there, but I don't know what it does

I removed the -C option, and now it's complaining that it cannot find
-lncurses


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

* Re: texttools and standard library packages
  2013-12-15 22:05 ` koburtch
@ 2013-12-22 19:24   ` koburtch
  2013-12-27  0:35     ` agent
  2013-12-27  0:36     ` agent
  0 siblings, 2 replies; 20+ messages in thread
From: koburtch @ 2013-12-22 19:24 UTC (permalink / raw)


On Sunday, December 15, 2013 5:05:15 PM UTC-5, kobu...@gmail.com wrote:
> On Tuesday, December 10, 2013 9:25:37 PM UTC-5, ag...@drrob1.com wrote:
> 
> > I am a total newbie in regards to Ada, but have been using stony brook
> 
> > 
> 
> > modula2 for many years.
> 
> > 
> 
> > I am trying to use the source texttools-2-1-0 and to compile the
> 
> > 
> 
> > ttdemo program.  I am getting an error saying that To255 is undefined.
> 
> > 
> 
> > I cannot find where this is.
> 
> > 
> 
> > 
> 
> > 
> 
> > Where do I look, or what library to I have to import (with,use)?
> 
> > 
> 
> > 
> 
> > 
> 
> > Also, it would be very helpful for me to have a listing of all
> 
> > 
> 
> > packages and procedures/functions in all the included libraries. Where
> 
> > would I find such a list that is easily searchable?
> 
> > 
> 
> > 
> 
> > 
> 
> > Thanks
> 
> 
> 
> I don't read this group often.  I noticed your message.
> 
> 
> 
> Texttools was taken over by Nicholas Boulenguez.  In his latest version, he made major changes to the structure.  This included renaming the functions, converting everything to Ada 2005 containers and unbounded strings.
> 
> 
> 
> The To255 function was in the older version of Texttools.  It converts a fixed string to an 255 character bounded string.  Nicholas' changes replaced bounded strings with unbounded strings.
> 
> 
> 
> If you need To255, you should try version 2.0.7, which is on the Pegasoft web site.
> 
> 
> 
> If you have specific questions about Texttools, you should email Nicholas, or contact me through the Pegasoft website and I will forward your questions to him.
> 
> 
> 
> Regards,
> 
> Ken Burtch

My server crashed shortly after posting.  Thank goodness for RAID 1.  I'm recovering my email and websites as I'm typing this.

If you have thoughts to improve Texttools, send them to Nicolas (or send them to me).  He hasn't updated Texttools in a year so maybe this will encourage him to clean up any issues you find.

Regards,
Ken Burtch

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

* Re: texttools and standard library packages
  2013-12-22 19:24   ` koburtch
@ 2013-12-27  0:35     ` agent
  2014-01-03 21:38       ` Ludovic Brenta
  2013-12-27  0:36     ` agent
  1 sibling, 1 reply; 20+ messages in thread
From: agent @ 2013-12-27  0:35 UTC (permalink / raw)


On Sun, 22 Dec 2013 11:24:35 -0800 (PST), koburtch@gmail.com wrote:

>On Sunday, December 15, 2013 5:05:15 PM UTC-5, kobu...@gmail.com wrote:
>> On Tuesday, December 10, 2013 9:25:37 PM UTC-5, ag...@drrob1.com wrote:
>> 
>> I am a total newbie in regards to Ada, but have been using stony brook
>> modula2 for many years.
>> I am trying to use the source texttools-2-1-0 and to compile the
>> ttdemo program.  I am getting an error saying that To255 is undefined.
>> I cannot find where this is.
>> Where do I look, or what library to I have to import (with,use)?
>> 
>> Thanks
>> 
>> 
>> I don't read this group often.  I noticed your message.
>> 
>> Texttools was taken over by Nicholas Boulenguez.  In his latest version, he made major changes to the structure.  This included renaming the functions, converting everything to Ada 2005 containers and unbounded strings.
>> The To255 function was in the older version of Texttools.  It converts a fixed string to an 255 character bounded string.  Nicholas' changes replaced bounded strings with unbounded strings.
>> If you need To255, you should try version 2.0.7, which is on the Pegasoft web site.
>> 
>> If you have specific questions about Texttools, you should email Nicholas, or contact me through the Pegasoft website and I will forward your questions to him.
>> 
>> Regards,
>> Ken Burtch
>
>My server crashed shortly after posting.  Thank goodness for RAID 1.  I'm recovering my email and websites as I'm typing this.
>
>If you have thoughts to improve Texttools, send them to Nicolas (or send them to me).  He hasn't updated Texttools in a year so maybe this will encourage him to clean up any issues you find.
>
>Regards,
>Ken Burtch

My suggestion is about the documentation.  It would be extremely
useful for me to have gpr files that will compile and run the
examples.

Right now, when I try to do that, I'm getting a stack overflow
whenever I run either basic or basic2.

There is no way for me to determine which version of the modules
binaries are installed via synaptic




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

* Re: texttools and standard library packages
  2013-12-22 19:24   ` koburtch
  2013-12-27  0:35     ` agent
@ 2013-12-27  0:36     ` agent
  1 sibling, 0 replies; 20+ messages in thread
From: agent @ 2013-12-27  0:36 UTC (permalink / raw)


On Sun, 22 Dec 2013 11:24:35 -0800 (PST), koburtch@gmail.com wrote:

>On Sunday, December 15, 2013 5:05:15 PM UTC-5, kobu...@gmail.com wrote:
>> On Tuesday, December 10, 2013 9:25:37 PM UTC-5, ag...@drrob1.com wrote:
>> 
>> I am a total newbie in regards to Ada, but have been using stony brook
>> modula2 for many years.
>> I am trying to use the source texttools-2-1-0 and to compile the
>> ttdemo program.  I am getting an error saying that To255 is undefined.
>> I cannot find where this is.
>> Where do I look, or what library to I have to import (with,use)?
>> 
>> Thanks
>> 
>> 
>> I don't read this group often.  I noticed your message.
>> 
>> Texttools was taken over by Nicholas Boulenguez.  In his latest version, he made major changes to the structure.  This included renaming the functions, converting everything to Ada 2005 containers and unbounded strings.
>> The To255 function was in the older version of Texttools.  It converts a fixed string to an 255 character bounded string.  Nicholas' changes replaced bounded strings with unbounded strings.
>> If you need To255, you should try version 2.0.7, which is on the Pegasoft web site.
>> 
>> If you have specific questions about Texttools, you should email Nicholas, or contact me through the Pegasoft website and I will forward your questions to him.
>> 
>> Regards,
>> Ken Burtch
>
>My server crashed shortly after posting.  Thank goodness for RAID 1.  I'm recovering my email and websites as I'm typing this.
>
>If you have thoughts to improve Texttools, send them to Nicolas (or send them to me).  He hasn't updated Texttools in a year so maybe this will encourage him to clean up any issues you find.
>
>Regards,
>Ken Burtch

My suggestion is about the documentation.  It would be extremely
useful for me to have gpr files that will compile and run the
examples.

Right now, when I try to do that, I'm getting a stack overflow
whenever I run either basic or basic2.

There is no way for me to determine which version of the modules
binaries are installed via synaptic


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

* Re: texttools and standard library packages
  2013-12-27  0:35     ` agent
@ 2014-01-03 21:38       ` Ludovic Brenta
  2014-01-05 21:33         ` agent
  0 siblings, 1 reply; 20+ messages in thread
From: Ludovic Brenta @ 2014-01-03 21:38 UTC (permalink / raw)


agent@drrob1.com writes on comp.lang.ada:
> My suggestion is about the documentation.  It would be extremely
> useful for me to have gpr files that will compile and run the
> examples.

There is one in
/usr/share/doc/libtexttools-doc/examples/examples.gpr.sed which you can
obtain by installing the package libtexttools-doc.

> Right now, when I try to do that, I'm getting a stack overflow
> whenever I run either basic or basic2.

I don't.  These examples work for me.

> There is no way for me to determine which version of the modules
> binaries are installed via synaptic

No way, really? What about "dpkg -l '*texttools*'"?

-- 
Ludovic Brenta.

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

* Re: texttools and standard library packages
  2014-01-03 21:38       ` Ludovic Brenta
@ 2014-01-05 21:33         ` agent
  0 siblings, 0 replies; 20+ messages in thread
From: agent @ 2014-01-05 21:33 UTC (permalink / raw)


On Fri, 03 Jan 2014 22:38:27 +0100, Ludovic Brenta
<ludovic@ludovic-brenta.org> wrote:

>agent@drrob1.com writes on comp.lang.ada:
>> My suggestion is about the documentation.  It would be extremely
>> useful for me to have gpr files that will compile and run the
>> examples.
>
>There is one in
>/usr/share/doc/libtexttools-doc/examples/examples.gpr.sed which you can
>obtain by installing the package libtexttools-doc.
>
>> Right now, when I try to do that, I'm getting a stack overflow
>> whenever I run either basic or basic2.
>
>I don't.  These examples work for me.
>
>> There is no way for me to determine which version of the modules
>> binaries are installed via synaptic
>
>No way, really? What about "dpkg -l '*texttools*'"?

I appreciate the help.

And I can't wait until I become omniscient like you.



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

end of thread, other threads:[~2014-01-05 21:33 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-11  2:25 texttools and standard library packages agent
2013-12-11 12:48 ` Niklas Holsti
2013-12-12 12:34   ` agent
2013-12-12 17:44     ` Niklas Holsti
2013-12-12 18:00       ` Dmitry A. Kazakov
2013-12-16  0:43         ` agent
2013-12-16  1:11           ` Ludovic Brenta
2013-12-16  1:38             ` agent
2013-12-16  8:18           ` Dmitry A. Kazakov
2013-12-16  9:23             ` Simon Wright
2013-12-19  1:40               ` agent
2013-12-19  8:57                 ` Simon Wright
2013-12-19 12:59                   ` agent
2013-12-20  1:46                     ` agent
2013-12-15 22:05 ` koburtch
2013-12-22 19:24   ` koburtch
2013-12-27  0:35     ` agent
2014-01-03 21:38       ` Ludovic Brenta
2014-01-05 21:33         ` agent
2013-12-27  0:36     ` agent

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