In ChartDirector for C++, there is a simple Qt project in "ChartDirector/qtdemo/helloworld". Have you tried it? You can use qtCreator to open the qt project file at "ChartDirector/qtdemo/helloworld/helloworld.pro" and compile and run it. Please let me know if the helloworld sample code works in your machine.
If the helloworld sample code works, it confirms ChartDirector works on your machine. For your case, I think there may be some issue in the project file. The followings are the key lines in the helloworld project file:
For your case, it seems you have not linked with the ChartDirector shared object "libchartdir.so", so there will be undefined reference to every ChartDirector function that you use. Please add "-lchartdir" to link to the ChartDirector shared object. I suggest to use:
Also, it seems you have not specified the runtime path. Note that the LIBS is only used by the linker to link your code. It tells the linker which shared object to use and the search path to find the shared object. So the code can compile and link successfully. However, it does not tell the executable where to find the shared object. So when you run the executable, it still cannot find the shared object. You have to either set the runtime path so that the executable can find the shared object at runtime, like:
QMAKE_RPATHDIR += /opt/ChartDirector/lib
Alternatively, you can copy the "libchartdir.so*" (including libchartdir.so, libchartdir.so.7 and libchartdir.so.7.0.0) to the default search path of your operating system, such as to "/usr/lib". In this way, you do not need to specify the runtime search path QMAKE_RPATHDIR or the link time search path -L/opt/ChartDirector/lib.