wxchartdir icon indicating copy to clipboard operation
wxchartdir copied to clipboard

Question about "wxchartviewer" project

Open wxinix opened this issue 9 months ago • 1 comments

I am trying to learn "wxchartviewer" project, Visual Studio 2022 - hoping to understand the code and customize it for academic use.

I am so perplexed could you help with the following questions?

  1. For DLL build, I cannot figure out where the wxWidgets dependent DLLs (e.g., wxbase32ud_vc14x_x64.dll and wxmsw32ud_core_vc14x_x64.dll) are specified? I didn't see from the project settings or wx_setup.prop.
  2. For Static build, I cannot find out where the static lib is specified? Do I need to build the wxWidgets static lib "monolithic"?

Thank you again.

wxinix avatar Mar 20 '25 13:03 wxinix

I am trying to learn "wxchartviewer" project, Visual Studio 2022 - hoping to understand the code and customize it for academic use.

Actually, the wxchartviewer project just references the source files in directory wxdemo/common. The project builds a static or shared library providing the classes wxChartViewer and wxViewPortControl which encapsulate the ChartDirector API for wxWidgets applications.

Instead of building a library a simpler approach could be to add the source files in wxdemo/common to one's own project.

I am so perplexed could you help with the following questions?

  1. For DLL build, I cannot figure out where the wxWidgets dependent DLLs (e.g., wxbase32ud_vc14x_x64.dll and wxmsw32ud_core_vc14x_x64.dll) are specified? I didn't see from the project settings or wx_setup.prop.

Yes, I agree that can be a bit confusing. This is a feature of the wxWidgets library when compiled with Visual C++: you don't have to specify any of the wxWidgets libraries - this is done for you by wxWidgets internally depending on how wxWidgets was built. That is, the linker automatically gets information about required wxWidgets libraries.

wx_setup.props is an important configuration file which has to be adjusted to match your wxWidgets environment. For example, the root directory of your wxWidgets installation is specified through the environment variable WXWIN in entry <wxRootDir>. If WXWIN is not set, compilation will fail. Another important entry is <wxShortVersionString> which has to match your wxWidgets installation.

  1. For Static build, I cannot find out where the static lib is specified?

Same answer as above: For Visual C++ wxWidgets does the work for you.

For other compilers libraries have to be specified - as you could see in the makefiles.

  1. Do I need to build the wxWidgets static lib "monolithic"?>

No. Using the monolithic build of wxWidgets is not recommended.

However, if you want to link wxWidgets statically into your application, you need to build the static wxWidgets version, of course.

The wxChartDir solution files define 3 solution configurations:

  1. Debug/Release - build static library using static wxWidgets
  2. Debug/Release DLL - build a DLL using wxWidgets DLLs
  3. Debug/Release wxDLL - build static library using wxWidgets DLLs

These configurations will only work if the respective wxWidgets builds are actually available.

utelle avatar Mar 20 '25 20:03 utelle

AFAICT this is not a real issue. Closing for now. Reopen if necessary.

utelle avatar Apr 08 '25 13:04 utelle