wxIshiko / wxCharts

A library to create charts in wxWidgets applications
https://www.wxishiko.com/wxCharts/
MIT License
114 stars 50 forks source link

Add build instructions #203

Open xleclercq opened 1 year ago

xleclercq commented 1 year ago

1) Build from scratch with CMake on Windows, Linux, Mac. 2) Use vcpkg on Windows.

pps83 commented 1 year ago

do you build yourself, or it also fails? At least post here how you build so others perhaps could try it

xleclercq commented 1 year ago

So what happened is that I tried to do this last weekend. I ran into an issue whereby the CMake build couldn't find the installed wxWidgets library. Not being a CMake expert I couldn't find the issue but it also convinced me I wasn't pleased with the way CMake is now the only way to build the lib due to the fact that it creates the exports.h file and so that file isn't found when using the other build techniques in the /build directory. So now I'm fixing that so that I don't need that file. And that should fix the build. So yes it also fails for me right now but only because somehow I can't get CMake's FindwxWidgets to find the installed wxWidgets core libraries. I'm working on fixing it now. I should have a fix by the end of the weekend.

asmwarrior commented 1 year ago

For me, under Mingw, I think there are two kinds of wx library: 1, the wx library built locally from the mingw32-make.exe 2, the wx library supplied by msys2, people just installed from the pacman command.

I think you can follow this: https://github.com/eranif/codelite/blob/master/CMakeLists.txt

And eranif's tool, either wx-config.exe or wx-config-msys2.exe is needed to define the CL_WX_CONFIG or WX_TOOL. The tools can be found here: eranif/wx-config-msys2: wx-config tool for MSYS2 based installation of wxWidgets using the mingw64 repository

And later I think you can use the command:

# find wxWidgets once
find_package(wxWidgets COMPONENTS adv aui base core html propgrid xml xrc net stc ribbon richtext REQUIRED)

I haven't tried this, I just give your the direction.

BTW: code::blocks now can support defining the similar method named "global compiler variables", which can define a variable named "wx-config", see: asmwarrior/cb_projects_for_wxWidgets: Code::Blocks projects for building wxWidgets sample code