comp.lang.ada
 help / color / mirror / Atom feed
* Building C main with Ada on Visual V++ - _image_base_
@ 2004-09-02 13:49 Paul Springer
  2004-09-02 16:38 ` Martin Krischik
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Springer @ 2004-09-02 13:49 UTC (permalink / raw)


I am trying to build a program in MS Visual C++ Studio. I have a C
main program and have included what I think are the appropriate .o
files and gnat libraries. I have complied with the steps I saw in a
old posting from this group. I can build and execute this mixed
language program using gnat tools.

The problem I am having in MS VS is an unresolved symbol called
_image_base_, used in the gnat file a-traceb.o. The symbol doesn't
seem to be defined in any of the gnat libraries. I have tried this
with and without the default .lib files (for a Win32 Console
application). The result is th same. I do check the checkmark for
including the standard libraries.

Does anyone have any advice on this? Thanks.
-Paul



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

* Re: Building C main with Ada on Visual V++ - _image_base_
  2004-09-02 13:49 Building C main with Ada on Visual V++ - _image_base_ Paul Springer
@ 2004-09-02 16:38 ` Martin Krischik
  2004-09-03 16:17   ` Paul Springer
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Krischik @ 2004-09-02 16:38 UTC (permalink / raw)


Paul Springer wrote:

> I am trying to build a program in MS Visual C++ Studio. I have a C
> main program and have included what I think are the appropriate .o
> files and gnat libraries. I have complied with the steps I saw in a
> old posting from this group. I can build and execute this mixed
> language program using gnat tools.

> The problem I am having in MS VS is an unresolved symbol called
> _image_base_, used in the gnat file a-traceb.o. The symbol doesn't
> seem to be defined in any of the gnat libraries. I have tried this
> with and without the default .lib files (for a Win32 Console
> application). The result is th same. I do check the checkmark for
> including the standard libraries.

Did you used "gnat bind" to create a bind file for Ada. Thats the files
which start with "b~". 

I have got an example on how to do that at:

http://cvs.sourceforge.net/viewcvs.py/adacl/CUnicode/

Look at "Include/NT/" for the bind file source.

With Regards

Martin.

-- 
mailto://krischik@users.sourceforge.net
http://www.ada.krischik.com




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

* Re: Building C main with Ada on Visual V++ - _image_base_
  2004-09-02 16:38 ` Martin Krischik
@ 2004-09-03 16:17   ` Paul Springer
  2004-09-05  8:00     ` Martin Krischik
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Springer @ 2004-09-03 16:17 UTC (permalink / raw)


Martin Krischik <krischik@users.sourceforge.net> wrote in message news:<8305344.aqMzkElDTs@linux1.krischik.com>...
> 
> Did you used "gnat bind" to create a bind file for Ada. Thats the files
> which start with "b~". 
> 

Martin,

Thanks for the reply. 

Yes, I did use gnatbind -n xxx.ali and compiled the resulting xxx.ads
and xxx.adb files to get a ~xxx.o file. I included this and the
original xxx.o file in the link libraries.

Do you know what the __image_base__ symbol is for? As far as I can
tell this symbol is referenced but not defined in the gnat libraries,
so I don't know where its supposed to come from.

-Paul



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

* Re: Building C main with Ada on Visual V++ - _image_base_
  2004-09-03 16:17   ` Paul Springer
@ 2004-09-05  8:00     ` Martin Krischik
  0 siblings, 0 replies; 4+ messages in thread
From: Martin Krischik @ 2004-09-05  8:00 UTC (permalink / raw)


Paul Springer wrote:

> Martin Krischik <krischik@users.sourceforge.net> wrote in message
> news:<8305344.aqMzkElDTsseparatekrischik.com>...
>> 
>> Did you used "gnat bind" to create a bind file for Ada. Thats the files
>> which start with "b~".
>> 
> 
> Martin,
> 
> Thanks for the reply.
> 
> Yes, I did use gnatbind -n xxx.ali and compiled the resulting xxx.ads
> and xxx.adb files to get a ~xxx.o file. I included this and the
> original xxx.o file in the link libraries.
> 
> Do you know what the __image_base__ symbol is for? As far as I can
> tell this symbol is referenced but not defined in the gnat libraries,
> so I don't know where its supposed to come from.

Well the name would suggest that it has something to do with the 'Image
attribute. Hence my question. If one of your Packages is not included when
your bind file is generated then the functions implementing 'Image would be
missing too.

Did you "with" all packages you need in "xxx.adb"? Even if you don't need
them directly. Did you use pragma Elaborate_All to make shure all needed
Child packages are drawn in as well?

Take a look at:

http://cvs.sourceforge.net/viewcvs.py/adacl/CUnicode/Include/NT/ada_dll.adb?rev=4.1&view=auto

Well it's for a DLL not an EXE but it might give you a hint.

However, I might be mistaken. BTW: there are more the one GNAT libraries.
i.E. Tasking seems to be implemented in a separate lib.

With Regards

Martin
-- 
mailto://krischik@users.sourceforge.net
http://www.ada.krischik.com




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

end of thread, other threads:[~2004-09-05  8:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-02 13:49 Building C main with Ada on Visual V++ - _image_base_ Paul Springer
2004-09-02 16:38 ` Martin Krischik
2004-09-03 16:17   ` Paul Springer
2004-09-05  8:00     ` Martin Krischik

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