A list for the developers of CellML tools

Text archives Help


[cellml-dev] Using the CellML API with Qt Creator (solved) was Re: CellML 1.10rc2


Chronological Thread 
  • From: alan.garny at dpag.ox.ac.uk (Alan Garny)
  • Subject: [cellml-dev] Using the CellML API with Qt Creator (solved) was Re: CellML 1.10rc2
  • Date: Wed, 14 Sep 2011 10:03:17 +0200

Hi Andrew,

> I have now got Qt Creator / Qt SDK installed on a different virtual
machine,
> and I was able to reproduce the problem you report.

Good good (so to speak!)...

> The cause of the problem is that the Qt version of MinGW is configured to
> statically link against libstdc++-6, rather than to use the
> libstdc++-6.dll, and it seems to come with a version of libstdc++-6.dll
> that doesn't correspond to the same MinGW version that ships with Qt.

It's clearly that indeed.

> Normal Qt programs linked with MinGW from the Qt SDK 1.1.3 don't need
> libstdc++-6.dll at all.

All I know is that OpenCOR currently requires mingwm10.dll and
libgcc_s_dw2-1.dll, but who knows it may end up require other libraries in
the future...? In fact, the small CellML program I mentioned before
(https://github.com/agarny/cellml-example-with-cmake) seems to require
libstdc++-6.dll...

> Therefore, the solution that will get things working for you the fastest
> is to simply make sure libstdc++-6.dll from standard MinGW is in the
> path ahead of the one that ships with Qt. This doesn't seem to cause any
> problems for apps built with the Qt SDK (at least not with the one I
> tested) because they all statically link libstdc++-6. To save you
> downloading the entire MinGW installer, I just sent you the
> libstdc++-6.dll file (standard disclaimer & license at
> http://gcc.gnu.org/onlinedocs/gcc-4.5.3/gcc/Copying.html, contact me if
> you want the source code for gcc and don't know how to get it yourself)
> - if anyone else wants me to send it to them too, let me know.

I just tried the libstdc++-6.dll file you sent me and copied it to the
folder where my small CellML program gets generated (thus taking precedence
over my MinGW's copy of libstdc++-6.dll), but that doesn't seem to be doing
the trick for me. I am wondering whether there isn't a conflict with
mingwm10.dll and libgcc_s_dw2-1.dll which, in my case, come from Qt's
version of MinGW...?

> For a longer term solution, we could simply ship libstdc++-6.dll with
> MinGW builds (and probably the MSVC2010 distributable component with
> the MSVC builds).

I would hate that solution. Not only it doesn't seem to be working (see
above; unless I overlooked something), but this is definitely not a 'clean'
solution to our current problem.

> An alternative would be to match what Nokia does and link
> statically against libstdc++-6 - I believe the MinGW maintainers
> recommend against that because it can mean there are two copies of
> certain shared data, but I'm not sure if it will actually cause any real
> problems in the libstdc++ case (and it is linked statically on other
> platforms like Linux...).

It seems to me that all that is required is to build the CellML API with the
MinGW version that comes with Qt. Nothing more nothing less, no?

> Please let me know if the short term solution of just using the standard
> MinGW DLL works for you (it did for me, with a small graphical Qt
> program that creates a blank window as well as making a CellML API call).

See above...

Alan





Archive powered by MHonArc 2.6.18.

Top of page