comp.lang.ada
 help / color / mirror / Atom feed
* Tash + ObjectAda Help
@ 2006-12-20 23:17 msblows
  2006-12-21  3:29 ` Aurele
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: msblows @ 2006-12-20 23:17 UTC (permalink / raw)


Hello, I've been trying to get Tash and ObjectAda to cooperate and have
had some problems.  I've never worked with importing from other
languages so please bear with me.  My environment is Nt4.0, ObjectAda
7.2.2, VC++ 6.0 (if its needed) and Tcl/Tk 8.4.14 installed.  My needs
are strictly gui at this point.  My first goal was to get the inlcuded
TASH hello_world program running.  The first thing I notice is I have
to move a lot of pragma inline calls from after the definition in the
body to after the declaration in the spec - not sure if that's an
ObjectAda-ism or the antiquity of my compiler.  So after getting
through all those, I have 239 unresolved externals, doh.  So I add
c:\tcl\lib to the linker-only list of links - that gets me down to 8
unresolved externals, huzzah.  I notice in the src directory of the
Tash tarball there are two .a files, hmm, that's a unix/linux
archive-linky-thing, eh?  So maybe I have to create equivalent .libs
for Windows?  I try building a static library out of the tclmacro.c and
tkmacro.c using VC and include them in ObjectAda, but now I am down to
just one error, fatal error LNK1104: cannot open file LIBC.lib.  I get
this one error whether I'm including c:\tcl\lib or not, so I'm not
certain I really need to include it now?  I'm *guessing* something is
wrong with the .libs I made with VC.  Can anyone make some
suggestions/observations?  Thanks!




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

* Re: Tash + ObjectAda Help
  2006-12-20 23:17 Tash + ObjectAda Help msblows
@ 2006-12-21  3:29 ` Aurele
  2006-12-21 18:51   ` msblows
  2006-12-21  9:16 ` gautier_niouzes
  2006-12-23 10:45 ` Simon Wright
  2 siblings, 1 reply; 9+ messages in thread
From: Aurele @ 2006-12-21  3:29 UTC (permalink / raw)


Using notepad, try creating a new text file named "What_Ever.LRF" (i.e.
Library ReFerence) in your release (and/or debug) directory of your
project directory.  Assuming the libries are all located in the project
directory under "My Libary", then the file sould include a list of the
reference llibries. Example "..\My Library\Libc.lib", etc.  Hope this
helps.

On Dec 20, 6:17 pm, msbl...@hotmail.com wrote:
> Hello, I've been trying to get Tash and ObjectAda to cooperate and have
> had some problems.  I've never worked with importing from other
> languages so please bear with me.  My environment is Nt4.0, ObjectAda
> 7.2.2, VC++ 6.0 (if its needed) and Tcl/Tk 8.4.14 installed.  My needs
> are strictly gui at this point.  My first goal was to get the inlcuded
> TASH hello_world program running.  The first thing I notice is I have
> to move a lot of pragma inline calls from after the definition in the
> body to after the declaration in the spec - not sure if that's an
> ObjectAda-ism or the antiquity of my compiler.  So after getting
> through all those, I have 239 unresolved externals, doh.  So I add
> c:\tcl\lib to the linker-only list of links - that gets me down to 8
> unresolved externals, huzzah.  I notice in the src directory of the
> Tash tarball there are two .a files, hmm, that's a unix/linux
> archive-linky-thing, eh?  So maybe I have to create equivalent .libs
> for Windows?  I try building a static library out of the tclmacro.c and
> tkmacro.c using VC and include them in ObjectAda, but now I am down to
> just one error, fatal error LNK1104: cannot open file LIBC.lib.  I get
> this one error whether I'm including c:\tcl\lib or not, so I'm not
> certain I really need to include it now?  I'm *guessing* something is
> wrong with the .libs I made with VC.  Can anyone make some
> suggestions/observations?  Thanks!




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

* Re: Tash + ObjectAda Help
  2006-12-20 23:17 Tash + ObjectAda Help msblows
  2006-12-21  3:29 ` Aurele
@ 2006-12-21  9:16 ` gautier_niouzes
  2006-12-21 18:57   ` msblows
  2006-12-22  7:01   ` Pascal Obry
  2006-12-23 10:45 ` Simon Wright
  2 siblings, 2 replies; 9+ messages in thread
From: gautier_niouzes @ 2006-12-21  9:16 UTC (permalink / raw)


msblows:
...
> The first thing I notice is I have
> to move a lot of pragma inline calls from after the definition in the
> body to after the declaration in the spec - not sure if that's an
> ObjectAda-ism or the antiquity of my compiler.

I think OA is just more "kasher" on this point.
Anyway, moving the inline pragma to the spec enables cross-unit
inlining (e.g. for GNAT).

About the .lib's: not sure what your problem exactly is. But...
- there is kind of a search path for lib's in the project options
- you can use GNU libs just by renaming lib*.a into *.lib (and
vice-versa!)
  cool, isn't it ?
- you can give a list of .lib's in a file, say, blabla.lst, and tell it
to the linker
  with @blabla.lst
I found these thing by hacking around, look at the globe_3d project
(link below) to see how I did it exactly.
HTH, Gautier
______________________________________________________________
Ada programming -- http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, e-mail address on the Web site!




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

* Re: Tash + ObjectAda Help
  2006-12-21  3:29 ` Aurele
@ 2006-12-21 18:51   ` msblows
  2006-12-21 20:31     ` Aurele
  0 siblings, 1 reply; 9+ messages in thread
From: msblows @ 2006-12-21 18:51 UTC (permalink / raw)


Aurele wrote:
> Using notepad, try creating a new text file named "What_Ever.LRF" (i.e.
> Library ReFerence) in your release (and/or debug) directory of your
> project directory.  Assuming the libries are all located in the project
> directory under "My Libary", then the file sould include a list of the
> reference llibries. Example "..\My Library\Libc.lib", etc.  Hope this
> helps.
>
Well, that did the trick, then it complained about oldnames.lib and I
fixed it in the same way.  Strange thing to me is the apilib directory
of ObjectAda has *both* of these .libs, and pointing to it does
nothing, but this .lrf method does!  Could you explain how this .LRF
file works differently then using the (more correct I'd assume) project
settings way?

Anyhoo, thank you very much Aurele!!!




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

* Re: Tash + ObjectAda Help
  2006-12-21  9:16 ` gautier_niouzes
@ 2006-12-21 18:57   ` msblows
  2006-12-22  7:01   ` Pascal Obry
  1 sibling, 0 replies; 9+ messages in thread
From: msblows @ 2006-12-21 18:57 UTC (permalink / raw)



gautier_niouzes@hotmail.com wrote:
> I think OA is just more "kasher" on this point.
> Anyway, moving the inline pragma to the spec enables cross-unit
> inlining (e.g. for GNAT)

Ah, good to know

> About the .lib's: not sure what your problem exactly is. But...
> - there is kind of a search path for lib's in the project options
> - you can use GNU libs just by renaming lib*.a into *.lib (and
> vice-versa!)
>   cool, isn't it ?
> - you can give a list of .lib's in a file, say, blabla.lst, and tell it
> to the linker
>   with @blabla.lst
> I found these thing by hacking around, look at the globe_3d project
> (link below) to see how I did it exactly.
> HTH, Gautier

I tried this method and got a complaint about wrong addresses or
alignment.  My guess is these lib*.a were compiled on linux, not
windows and that's bad juju?  My cross-platform knowledge is terrible I
admit.  I did finally get things working as per my response to Aurele
above, but thank you much Gautier for chipping in!




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

* Re: Tash + ObjectAda Help
  2006-12-21 18:51   ` msblows
@ 2006-12-21 20:31     ` Aurele
  0 siblings, 0 replies; 9+ messages in thread
From: Aurele @ 2006-12-21 20:31 UTC (permalink / raw)


Not sure why the ".LRF" file works.  Here is another observation. You
might want to use "Libcmt.lib" (the multi-thread version) instead of
"Libc.lib".  Also, regarding the "oldnames.lib" problem.  Make a
complete backup of the ../Aonix/ObjectAda "Bin" and "Lib" directories,
and replace certain older Microsoft files with newer one from your
recent MS C++ compiler (example: in the Bin directory, replace the
linker, lib, etc, and in the Lib directory, replace kernel.lib,
libcmt.lib etc). You get the idea. If done correctly. it should solve
the problem.  Make sure you make that back though, you never know, but
it works for me.

On Dec 21, 1:51 pm, msbl...@hotmail.com wrote:
> Aurele wrote:
> > Using notepad, try creating a new text file named "What_Ever.LRF" (i.e.
> > Library ReFerence) in your release (and/or debug) directory of your
> > project directory.  Assuming the libries are all located in the project
> > directory under "My Libary", then the file sould include a list of the
> > reference llibries. Example "..\My Library\Libc.lib", etc.  Hope this
> > helps.Well, that did the trick, then it complained about oldnames.lib and I
> fixed it in the same way.  Strange thing to me is the apilib directory
> of ObjectAda has *both* of these .libs, and pointing to it does
> nothing, but this .lrf method does!  Could you explain how this .LRF
> file works differently then using the (more correct I'd assume) project
> settings way?
> 
> Anyhoo, thank you very much Aurele!!!




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

* Re: Tash + ObjectAda Help
  2006-12-21  9:16 ` gautier_niouzes
  2006-12-21 18:57   ` msblows
@ 2006-12-22  7:01   ` Pascal Obry
  2006-12-23  5:09     ` Gautier
  1 sibling, 1 reply; 9+ messages in thread
From: Pascal Obry @ 2006-12-22  7:01 UTC (permalink / raw)
  To: gautier_niouzes

gautier_niouzes@hotmail.com a �crit :
> - you can use GNU libs just by renaming lib*.a into *.lib (and
> vice-versa!)
>   cool, isn't it ?

I doubt this works! If it does then it is just in a very simple lib and
by chance I would say :)

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|              http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595



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

* Re: Tash + ObjectAda Help
  2006-12-22  7:01   ` Pascal Obry
@ 2006-12-23  5:09     ` Gautier
  0 siblings, 0 replies; 9+ messages in thread
From: Gautier @ 2006-12-23  5:09 UTC (permalink / raw)


Pascal Obry wrote:

> gautier_niouzes@hotmail.com a �crit :
>> - you can use GNU libs just by renaming lib*.a into *.lib (and
>> vice-versa!)
>>   cool, isn't it ?
> 
> I doubt this works! If it does then it is just in a very simple lib and
> by chance I would say :)
> 
> Pascal.

Probably, but it is worth trying...
I had chance a couple of times, for instance with the FreeGLUT library.
Indeed I looked for a conversion tool and read on some sites that it was
only a question or renaming. The file formats seem also to be similar
(!<arch> ...); and at least ld finds what is it looking for.
Maybe only the *.lib -> lib*.a is ok.

Gautier
______________________________________________________________
Ada programming -- http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, e-mail address on the Web site!



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

* Re: Tash + ObjectAda Help
  2006-12-20 23:17 Tash + ObjectAda Help msblows
  2006-12-21  3:29 ` Aurele
  2006-12-21  9:16 ` gautier_niouzes
@ 2006-12-23 10:45 ` Simon Wright
  2 siblings, 0 replies; 9+ messages in thread
From: Simon Wright @ 2006-12-23 10:45 UTC (permalink / raw)


msblows@hotmail.com writes:

> Hello, I've been trying to get Tash and ObjectAda to cooperate and have
> had some problems.  I've never worked with importing from other
> languages so please bear with me.  My environment is Nt4.0, ObjectAda
> 7.2.2, VC++ 6.0 (if its needed) and Tcl/Tk 8.4.14 installed.

With Terry Westley's agreement I've started a SourceForge project for
tash at sf.net/projects/tcladashell. So far I am a lone voice :-) and
can support GNAT on Mac OS X, Linux (Ubuntu here), Solaris 10 x86 and
Windows.

The project pages are a wiki so if you want to add any remarks mail me
(pretty sure there's an issue with the internal 'mail for a password'
feature). Ditto if you want to join the project.

>                                 My first goal was to get the inlcuded
> TASH hello_world program running.

I think my problem here is that the limits on the free edition of the
Aonix compiler stop hello_world compiling or at any rate even trying
to link. But since hello_world serves the dual purpose of being a demo
and also compiling the world I'm sure something could be done about
that!

>                                The first thing I notice is I have
> to move a lot of pragma inline calls from after the definition in the
> body to after the declaration in the spec - not sure if that's an
> ObjectAda-ism or the antiquity of my compiler.

Sounds to me as though GNAT ought not to like this either. My personal
experience of pragma Inline is that the improvements you get are
marginal if not negative (PowerPC). There are not all that many of
these -- 20 or so -- perhaps I've removed them already. I'll reach for
my flaming sword ..



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

end of thread, other threads:[~2006-12-23 10:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-20 23:17 Tash + ObjectAda Help msblows
2006-12-21  3:29 ` Aurele
2006-12-21 18:51   ` msblows
2006-12-21 20:31     ` Aurele
2006-12-21  9:16 ` gautier_niouzes
2006-12-21 18:57   ` msblows
2006-12-22  7:01   ` Pascal Obry
2006-12-23  5:09     ` Gautier
2006-12-23 10:45 ` Simon Wright

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