From: Per Sandberg on
The core reason is that the Binary Interface specific the name-mangling
in C++ is different between gcc and MSVC, on top of that the
documentation in the MSVC case is "sparse".
Then you will end up with two runtimes for C++, and to run MSVC and
GCC(g++) in parallel requires a very consistent way of doing things
since among all other things ther will be two different heaps...

/Per


2010-01-06 23:23, Alexis skrev:
> On 6 ene, 13:17, Vadim Godunko<vgodu...(a)gmail.com> wrote:
>> On Jan 6, 12:04 am, Alexis<jose_alexis_paez_thurg...(a)hotmail.com>
>> wrote:
>>
>>> I'm using GNAT GPL 2009 and QTada 3.0. I have installed the QT 4.6.0
>>> software package for VS2008, I have set the c:\Qt\4.6.0\bin path as
>>> the first path, but it doesn't work with QTAda programs, though all
>>> VS2008 C++ programs work fine.
>>
>> QtAda can't be used with MSVC for technical reasons. You need to use
>> prebuild Qt for MinGW port of build Qt by hands using GCC 4.4 compiler
>> or G++ compiler from GNAT GPL 2009. You also can use prebuild QtAda
>> 3.1 snapshot for Qt 4.6.0/MinGW.
>
> Hi,
>
> Thanks for your help. I'm quite new to QT so I'm not familiar with
> some things. Do you mean that QtAda doesn't work with the Qt Windows
> libraries for MSVC? Only MinGW? What's the reason for this?
>
> Many thanks and best regards!
> Alexis.
>
From: Dmitry A. Kazakov on
On Thu, 07 Jan 2010 08:19:17 +0100, Per Sandberg wrote:

> The core reason is that the Binary Interface specific the name-mangling
> in C++ is different between gcc and MSVC, on top of that the
> documentation in the MSVC case is "sparse".

That should not be a problem in case of C. One should only make a choice
between stdcall and cdecl convention when you make a call from Ada. I guess
Qt has plain C interface? Then what happens inside of it is no matter.

> Then you will end up with two runtimes for C++, and to run MSVC and
> GCC(g++) in parallel requires a very consistent way of doing things
> since among all other things ther will be two different heaps...

Actually I used such combinations in other cases (not Qt), e.g. GNAT Ada
run-time + MSVC (sometimes with MFT!) + some bunch of third party libraries
of unknown language and origin.

The key issue is to set proper compiler/linker options for the MSVC
project. Which is FAR from being trivial. Another huge issue is deployment,
with MS manifests (due to broken implementations of) you simply cannot tell
if linked code will or will not work on another computer.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
From: Alexis on
On 7 ene, 11:59, "Dmitry A. Kazakov" <mail...(a)dmitry-kazakov.de>
wrote:
> On Thu, 07 Jan 2010 08:19:17 +0100, Per Sandberg wrote:
> > The core reason is that the Binary Interface specific the name-mangling
> > in C++ is different between gcc and MSVC, on top of that the
> > documentation in the MSVC case is "sparse".
>
> That should not be a problem in case of C. One should only make a choice
> between stdcall and cdecl convention when you make a call from Ada. I guess
> Qt has plain C interface? Then what happens inside of it is no matter.
>
> > Then you will end up with two runtimes for C++, and to run MSVC and
> > GCC(g++) in parallel requires a very consistent way of doing things
> > since among all other things ther will be two different heaps...
>
> Actually I used such combinations in other cases (not Qt), e.g. GNAT Ada
> run-time + MSVC (sometimes with MFT!) + some bunch of third party libraries
> of unknown language and origin.
>
> The key issue is to set proper compiler/linker options for the MSVC
> project. Which is FAR from being trivial. Another huge issue is deployment,
> with MS manifests (due to broken implementations of) you simply cannot tell
> if linked code will or will not work on another computer.
>
> --
> Regards,
> Dmitry A. Kazakovhttp://www.dmitry-kazakov.de

Thanks a lot to all of you, your advice has been very helpful. I have
now installed QT 4.5.1 MinGW on my machine and the QtAda programs work
fine, which is what I wanted.

I don't remember seeing any mention of this fact on the QtAda website,
it might be something interesting to add a note on this.

May thanks!
Best regards, Alexis.
From: Vadim Godunko on
On Jan 7, 1:59 pm, "Dmitry A. Kazakov" <mail...(a)dmitry-kazakov.de>
wrote:
> On Thu, 07 Jan 2010 08:19:17 +0100, Per Sandberg wrote:
> > The core reason is that the Binary Interface specific the name-mangling
> > in C++ is different between gcc and MSVC, on top of that the
> > documentation in the MSVC case is "sparse".
>
> That should not be a problem in case of C. One should only make a choice
> between stdcall and cdecl convention when you make a call from Ada. I guess
> Qt has plain C interface? Then what happens inside of it is no matter.
>
Qt is pure C++ library, there is no C interface provided by it.

> > Then you will end up with two runtimes for C++, and to run MSVC and
> > GCC(g++) in parallel requires a very consistent way of doing things
> > since among all other things ther will be two different heaps...
>
> Actually I used such combinations in other cases (not Qt), e.g. GNAT Ada
> run-time + MSVC (sometimes with MFT!) + some bunch of third party libraries
> of unknown language and origin.
>
> The key issue is to set proper compiler/linker options for the MSVC
> project. Which is FAR from being trivial. Another huge issue is deployment,
> with MS manifests (due to broken implementations of) you simply cannot tell
> if linked code will or will not work on another computer.
>
QtAda's code includes both C/C++ and Ada code which refers to each
others in both directions, so it is unpractical to separate it into
two independent shared libraries to build C/C++ part using MSVC and
Ada part using GNAT; but mixing of MSVC and GNAT object files in the
same shared library is not supported now.
From: Hibou57 (Yannick Duchêne) on
On 7 jan, 23:11, Vadim Godunko <vgodu...(a)gmail.com> wrote:
> Qt is pure C++ library, there is no C interface provided by it.
While I do not know about the technical details, I use to read from
place to place, GNAT provides a custom support for interfacing Ada and
C++ library, as well as ObjectAda does, if I'm not wrong.

Otherwise, to have an easier C “ interfacable ” library in the same
area, GTK is a good option.

Honestly, I do not like so called “ portable ” UIs (personal feeling
with reasons), but although I do not really enjoy it, it seems to me
GTK is easier to use than Qt (and more lightweight in most of case).

Sorry if I ever hurt someones with my comments on the subject (not Ada
related, sorry about it too).
First  |  Prev  |  Next  |  Last
Pages: 1 2 3
Prev: Best Beauty Tips online
Next: What is a student?