wxIshiko / wxCharts

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

Can't compile wxcharts_vc16.vcxproj with VS2019 (vc142) #194

Open Anton-V-K opened 2 years ago

Anton-V-K commented 2 years ago

When compiling wxcharts_vc16.vcxproj (main branch) with VS2019 (vc142) following errors occur for each CPP-file: wxWidgets-3.1.5\include\msvc\wx\setup.h(140,10): fatal error C1083: Cannot open include file: '../../../lib/vc_x64_lib/mswud/wx/setup.h': No such file or directory (compiling source file ..\..\src\wxchartsdataset.cpp) The correct dir name is vc14x_x64_dll and not vc_x64_lib, so probably somethings is wrong with pre-processor defines in wxcharts_vc16.vcxproj (missing wxMSVC_VERSION_AUTO?)

VS2019 16.11.2 wxWidgets 3.1.5 OS: Windows 10 21H1 64-bit

xleclercq commented 2 years ago

Did you build wxWidgets as a shared lib or static libs? The folder on my computer is vc_x64_lib, although that would also be an earlier wxWidgets version.

xleclercq commented 2 years ago

Lines 28 and 29 here https://github.com/wxIshiko/wxCharts/blob/main/build/bakefiles/wxcharts.bkl#L28 I think are the only places where we configure the wxWidgets installation.

xleclercq commented 2 years ago

Looking at include\msvc\wx\setup.h there are a series of MACROs that define where it looks for lib/vc_x64_lib/mswud/wx/setup.h or equivalent such as WXUSINGDLL.

Anton-V-K commented 2 years ago

Did you build wxWidgets as a shared lib or static libs?

I haven't built it by myself. I've downloaded the headers along with the pre-built binaries from the official site.

xleclercq commented 2 years ago

Did you try defining WXUSINGDLL in your project's compile options and see if it looks in the right location?

xleclercq commented 2 years ago

Can you give me a link to the page where you downloaded it from?

Anton-V-K commented 2 years ago

For my project I define _WINDOWS;WIN32;__WXMSW__;wxMSVC_VERSION_AUTO;wxUSE_UNICODE;WXUSINGDLL;.... It has no problems with picking up the proper setup.h.

The official page for downloading wxWidgets library is https://www.wxwidgets.org/downloads/. I use Latest Development Release 3.1.5 for VS 2015/2017/2019.