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

Message ListMessage List     Post MessagePost Message

  Unable to link Qt samples
Posted by neochart on Jun-24-2011 08:11
Hello,

I am trialling ChartDirector for C++.

I am using Visual Studio 2008. I have had no problem building your MFC samples. However, when I try to build any of your Qt sample projects I get a whole load of linker errors. They are all essentially of the following format;

Error 1 error LNK2019: unresolved external symbol _CBaseChart_getHTMLImageMap referenced in function "public: char const * __thiscall BaseChart::getHTMLImageMap(char const *,char const *,char const *,int,int)" (?getHTMLImageMap@BaseChart@@QAEPBDPBD00HH@Z) helloworld.obj helloworld

All the errors relate to unresolved externals in the ChartDirector library.

I am using the Qt plug-in for Visual Studio and the Qt .pro file provided by you is recognized fine. It also has configured the include path to point to ChartDirector/include and to add the path to chartdir50.lib.

Any help would be appreciated.

thanks

  Re: Unable to link Qt samples
Posted by Peter Kwan on Jun-25-2011 04:05
Hi neochart,

I have just tried myself using VS 2008 and the QT plug-in. It works normally in my case.

What I did was:

(a) Unzip the "chartdir_cpp_win32.zip" to a directory.

(b) Open VS 2008. Use QT/Open Project File to open the file "helloworld.pro".

(c) Compile and run the program.

When I went to Project/Properties, and looked at the "Configuration Properties/Linker/Input", I saw that the "Additional Dependencies" had been set to:

qtmaind.lib ../../lib/chartdir50.lib QtGuid4.lib QtCored4.lib

There should be a library path "../../lib/chartdir50.lib".

If the above still cannot solve the problem, would you mind to double check the followings?

(a) Are you using the 32-bit edition of "ChartDirector for C++"? (From my understanding, QT is 32-bit, so the QT plug-in may create a 32-bit project, and it would not like with 64-bit DLL.)

(b) Have you copied or moved the QT project directory after unzipping? The library path is a relative path "../../lib/chartdir50.lib". If you move the QT project directory, you may need to update the path.

If the problem still cannot be solved, is it possible to perform the followings:

(a) Delete the subdirectory "ChartDirector/doc" (to reduce size).

(b) Zip the entire ChartDirector subdirectory (with the QT sample - VS 2008 should have created the helloworld solution file in the QT sample code directory too) and email to me for testing. My email is pkwan@advsofteng.net

(c) Also, please kindly inform me if you are using 32-bit or 64-bit Windows, and the version of Windows you are using.

Regards
Peter Kwan

  Re: Unable to link Qt samples
Posted by neochart on Jun-25-2011 05:49
Doh!

I was using x64 ChartDirector. Qt don't seem to make x64 for windows readily available. May have to build it myself.

The program builds fine when using 32bit ChartDirector.

Thanks for your help Peter. Much appreciated.