ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  chartdir under MINGW 64 bits Windows 64 bits
Posted by Anis on Jun-27-2011 16:24
Hi,
I am trying to run the demo examples of chart dir under MINGW 64 bits under Windows 7 64
bits and i get crashes.

The compilation steps is done without any issues using MINGW 64 bits and ChartDirector lib
for C++ 64 bits.

But then when trying to run the demo the application crash? Any idea? does the chartdir lib
support MINGW 64 bits?

Thks.

  Re: chartdir under MINGW 64 bits Windows 64 bits
Posted by Peter Kwan on Jun-28-2011 01:02
Hi Anis,

I have just tried myself. It works normally in my case.

What I have done is:

(a) Download MinGW 64-bit from "http://www.drangon.org/mingw/". The one I downloaded is "mingw-w64-bin-x86_64-20110627.7z" and unzip it.

(b) Download "ChartDirector for C++" for Win64 and unzip it.

(c) Go to "ChartDirector\\cppdemo\\simplebar". Copy the "chartdir50.dll" into that directory. Enter the command:

\\mingw64\\bin\\g++ -I../../include chartdir50.dll simplebar.cpp -o simplebar

*** Note ***: The \\mingw is the directory where I have unzipped MINGW to.

(d) Copy the MINGW DLLs from \\mingw64\\bin to "ChartDirector\\cppdemo\\simplebar". Run "simplebar". The program completes normally and a bar chart "simplebar.png" is created in the directory.

In your case, if your application "crash", would you mind to inform me the exact error message or screen shot. Also, please kindly inform me the exact steps you use to produce the error message.

Hope this can help.

Regards
Peter Kwan

  Re: chartdir under MINGW 64 bits Windows 64 bits
Posted by Anis on Jun-28-2011 03:22
Hi Peter,
From my side :
1. I download Mingw from http://mingw-w64.sourceforge.net/ -> then "WIN64 Downloads" -> mingw-w64-
bin_i686-mingw_20110625.zip
2. Downloading and Compiling Qt 4.7.3 under windows 64 bits archi

3. Downloading "chartdir_cpp_win64.zip"  & Compiling the examples of ChartDir under  "qtdemo" for example
"financedemo"

4. when executing "financedemo" i get a segmentation fault in "ptr(CViewPortManager_create())" in chartdir.h
   4.1 and this is the same issue i get in my code using Qt & chartdir lib.
   4.2 i can't give you more information or snapshots  since this is the only information i get from GDB.
   4.3 i get also the same segmentation fault with setLicenseCode function.

5. is there is any kind of log i can generate from the lib? It will be helpfull.

Rgds,
Anis

  Re: chartdir under MINGW 64 bits Windows 64 bits
Posted by Peter Kwan on Jun-29-2011 01:11
Hi Anis,

I suspect the issue may be related to the 64-bit QT using mingw.

I have tried to just compile the cppdemo (without using QT) and add the line Chart::setLicenseCode("....."); and also CViewPortManager_create();. The code still compile and run normally and without error.

I cannot found any official pre-compiled distribution of "QT mingw Win64". In fact, according to QT documentation, this configuration is in the QT "not supported" list, and there is no official documentation on QT on how to build "QT mingw Win64". So I assume any "QT mingw Win64" must be custom built.

To diagnose the problem, may be you can try "cppdemo\\simplebar.cpp" code with the lines Chart::setLicenseCode("....."); and CViewPortManager_create(); added, and using the built method mentioned in my last email, to see if it works in your case.

If its works, you may create a simple QT program, and copy the "simplebar.cpp" charting code to your QT program, and see if it still works. If it does not work in the QT program, it means the QT build method (which may use different compilation flags), or just linking with the QT DLLs. may cause the problem.

Regards
Peter Kwan

  Re: chartdir under MINGW 64 bits Windows 64 bits
Posted by Anis on Jun-29-2011 16:23
Hi Peter,
is it possble to ChartDir to support this platform?

Rgds,
Anis

  Re: chartdir under MINGW 64 bits Windows 64 bits
Posted by Peter Kwan on Jun-30-2011 00:40
Hi Anis,

Yes. I think I have already shown how to compile ChartDirector code using MINGW 64 bits on Windows 64 bits.

However, if you are referring to QT MINGW 64 bits Windows 64 bits, then I am worry it is not supported. It is because QT itself is not supported on MINGW 64 bits Windows 64 bits, so there is no official workable QT implementation for MINGW 64 bits Windows 64.

As QT is open source, even if a platform is not supported by QT, everyone can try to compile it himself using his own methods. The issue is, people may use different build methods, configure options, compiler versions, etc., and the resulting QT may be binary incompatible with each others. (It is common in open source project that code built using different methods, versions, configure options, etc. are binary incompatible to each others. It happens in Perl, Python, PHP, etc., so it may happen in QT as well.) So it is not practical to support any custom built QT, unless it is binary compatible to an official QT, but there is no official QT for MINGW 64 bits on Windows 64 bits.

I am speculating, since ChartDirector works with MINGW 64 bits on Windows 64 bits, if the QT in built in a compatible way (which I am not sure how), it should work with QT as well.

Regards
Peter Kwan

  Re: chartdir under MINGW 64 bits Windows 64 bits
Posted by DC Kelley on Feb-12-2012 02:19
Is this lack of 64 bit windows release still true?  We are trying to cope with the 32/64 build issues and the "post Microsoft" Qt development path issues here before we jump into a cross platform Qt project which will use CD, so the experiences of others is sought.

  Re: chartdir under MINGW 64 bits Windows 64 bits
Posted by Peter Kwan on Feb-13-2012 23:08
Hi DC Kelley,

ChartDirector for C++ Win64 have been released for quite a while. The issue in this thread is not about Win64, but about how to make it work with MinGW Win64 QT.

MinGW Win64 QT is not supported as according to Nokia (the company that develops QT). Also, I am not aware of any pre-compiled MinGW Win64 QT that can be downloaded from the Internet. However, QT is open source, so it is always possible for someone to compile it himself (may require some modifications or other tricks).

What we have found is that ChartDirector for Win64 is compatible with MinGW. I have not actually tried to compile MinGW Win64 QT myself, but according to Anis, ChartDirector does not seem to work with his compilation of MinGW Win64 QT. From his description, it seems to be a binary incompatibility issue caused by incompatible compilation flags.

I have just browsed Nokia's QT web site again, and I found that MinGW Win64 QT is still not supported. But VS2010 Win64 QT is listed as a "Tier 2" platform. As a "Tier 2" platform, there is no official pre-compiled version. So if we are to test it, we would need to compile one ourselves. I will probably try to do this within a month (as part of the release testing of ChartDirector Ver 5.1).

Anyway, my speculation is that the current version of ChartDirector for C++ on Win64 should be compatible with VS2010 Win64 QT. It is because the MFC sample code is known to be compatible with VS2010 Win64, and the ChartDirector DLL "chartdir50.dll" for MFC and QT is the same DLL. So the QT program hopefully can link to the ChartDirector DLL using VS 2010, just like the MFC program can.

Regards
Peter Kwan