wxIshiko / wxCharts

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

Add possibility to remove debug asserts from the release build #201

Closed AenBleidd closed 2 years ago

AenBleidd commented 2 years ago

Signed-off-by: Vitalii Koshura lestat.de.lionkur@gmail.com

xleclercq commented 2 years ago

I wasn't familiar with this wxDEBUG_LEVEL macro but looking at the documentation it impacts wxASSERT, wxFAIL and wxCHECK, which are not used in wxCharts (but probably should be at some point). I guess I'm missing some info, can you explain what this fixes? Thanks.

AenBleidd commented 2 years ago

@xleclercq, this PR fixes an issue when wxWidgets library is built with wxDEBUG_LEVEL=0 (that means no debug asserts) but when wxCharts using it without providing this flag (and by default in wx/debug.h this macro is not defined that enables debug asserts) that leads to linking issues similar to this (showing just the frrst one for example, the others are the same:

wxtimeserieschart.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) void __cdecl wxOnAssert(char const *,int,char const *,char const *,char const *)" (__imp_?wxOnAssert@@YAXPEBDH000@Z)
xleclercq commented 2 years ago

Thanks for explaining. Merged!