with "../../yami.gpr";

19 views
Skip to first unread message

Ricardo Aguirre

unread,
Feb 1, 2012, 1:16:54 PM2/1/12
to ya...@googlegroups.com
Hi,
 
Now I'm developing my system with no problems 
Thank you, I really apreciate all your help.

Is the first time that I use ada code that was not developed by us.
And I want to make you a question, I know that in your subscription example you include 
yami.gpr 
and inside yami.gpr its included: 
with "std_cpp.gpr";
with "Ws2_32.gpr";
with "yami_core.gpr";
I want to delete this source code dependences and I want to include just a library

I already download the yami4 bin version and I want to include just these binaries 
but I'm not preatty sure how to do this.

I just want to make something similar like in your java subscription example;
for its compilation and its execution just is included a yami4.jar

Do you know how should I do?



--Panzón

Maciej Sobczak

unread,
Feb 2, 2012, 2:44:41 AM2/2/12
to yami4
On Feb 1, 7:16 pm, Ricardo Aguirre <el.mas...@gmail.com> wrote:

> And I want to make you a question, I know that in your subscription example
> you include
>
> *yami.gpr *
>
> and inside yami.gpr its included:
>
> with "std_cpp.gpr";
> with "Ws2_32.gpr";
> with "yami_core.gpr";
>
> I want to delete this source code dependences and I want to include just a
> library

> I just want to make something similar like in your java subscription
> example;
> for its compilation and its execution just is included a yami4.jar

It is not possible with the GNAT Project Manager. All these
"dependencies" exist only to describe the linker options that need to
be used together to build a complete executable. For example, the
Ws2_32.gpr file is a very short file that instructs the linker to link
with the Windows Sockets library (on Windows).

It is possible to compile YAMI4 programs without these project files
by forcing additional linker options in the main project file or by
getting rid of project files altogether and using Makefiles. But no
matter what you do, this information will have to be provided to the
linker somehow, so you can only trade one inconvenience with another.
I think you should not be afraid of these files, they do not
contribute any complexity to the build system. Just keep them together
in the same directory and let the linker use them.

Regards,

--
Maciej Sobczak * http://www.inspirel.com

Ricardo Aguirre

unread,
Feb 3, 2012, 9:14:13 AM2/3/12
to ya...@googlegroups.com
mmm,
I have two problems with that
1.- We should make tests for each source that we use. Do you have some coverage tests for yami4 code?
2.- I should include my "suscription project" inside a dsa project, so I will use macrocompiler po_gnatdist. And I don't know how to include a .gpr inside my configuration file  .cfg... I just want to use yami4 in one DSA partition. 
Do you know how to do so?

Now I'm trying to Create an Ada library like this:
Also I'm thinking that I should aggregate library proyect
But I'm thinking that maybe I will forget some dependency and every will fail...

Thanks





--Panzón



2012/2/2 Maciej Sobczak <see.my....@gmail.com>

Maciej Sobczak

unread,
Feb 4, 2012, 5:10:30 PM2/4/12
to yami4
On 3 Lut, 15:14, Ricardo Aguirre <el.mas...@gmail.com> wrote:

> I have two problems with that
> 1.- We should make tests for each source that we use. Do you have some
> coverage tests for yami4 code?

The comprehensive tests for each supported programming language are
included in the distribution, under the "test" directory for each
language.

> 2.- I should include my "suscription project" inside a dsa project, so I
> will use macrocompiler po_gnatdist. And I don't know how to include a .gpr
> inside my configuration file  .cfg... I just want to use yami4 in one DSA
> partition.
> Do you know how to do so?

To be frank - I see no reason to use DSA, so including YAMI4 in a DSA
project is not a problem... ;-)
Do you mean that DSA projects don't rely on the GNAT Project Manager?
Very strange.
Just force appropriate linker options (you can see them all when the
YAMI4 example programs are compiled, as they are printed on the screen
at the last compilation step) manually, without using .gpr files.

Ricardo Aguirre

unread,
Feb 4, 2012, 5:24:09 PM2/4/12
to ya...@googlegroups.com
Hi, 
Thankyou 

Now I try to copy the entire yami4 source
into my src directory
but I get this error when I'm compiling
I know that I shouldn't use the DSA project and yami
but DSA part was already developed

Do you have some idea of the reason of this error?

--Panzón



2012/2/3 Ricardo Aguirre <el.m...@gmail.com>

Ricardo Aguirre

unread,
Feb 4, 2012, 5:31:10 PM2/4/12
to ya...@googlegroups.com
Do you mean that DSA projects don't rely on the GNAT Project Manager?
I don't know how to include it... I think that it should be supported... just I don't now how... I also ask on the ada irc channel... but no many people know DSA

Yesterday I read this manual... but I couldn't find how to include a gpr

I'll keep searching

--Panzón



2012/2/4 Maciej Sobczak <see.my....@gmail.com>

Maciej Sobczak

unread,
Feb 5, 2012, 4:10:56 AM2/5/12
to yami4
On 4 Lut, 23:24, Ricardo Aguirre <el.mas...@gmail.com> wrote:

> Now I try to copy the entire yami4 source
> into my src directory
> but I get this error <http://pastebin.com/LDS9PVWC> when I'm compiling

This looks like a linker/project configuration problem - missing path
to YAMI4 core libraries, perhaps?
Please note that to link the final application executable you need to
provide two libraries (libyamiada.a AND libyamicore.a), as described
here:

http://www.inspirel.com/yami4/book/2-3.html

Both libraries reside in the lib directory of the YAMI4 distribution.
Please make sure that both libraries are named in the final build
configuration of your application.

Ricardo Aguirre

unread,
Feb 7, 2012, 9:24:34 AM2/7/12
to ya...@googlegroups.com
That was my problem I add these 3 args 
/opt/yami4-gpl-1.4.0/lib/libyamiada.a /opt/yami4-gpl-1.4.0/lib/libyamicore.a /opt/gnat/lib/libstdc++.a 
in the linking phase and then it runs perfectly

Thank you my friend



--Panzón



2012/2/5 Maciej Sobczak <see.my....@gmail.com>
Reply all
Reply to author
Forward
0 new messages