Образец wxwidgets vs2019 hello world -> "wxstrcoll not found" - PullRequest
0 голосов
/ 10 июля 2020

Похоже, многие люди сталкиваются с этим, и, похоже, я не могу найти никакого решения.

Следуйте точным инструкциям, загрузите предварительно скомпилированные библиотеки, v 3.0.5 - последняя стабильная сборка

set wxwin env var
make new 32bit empty project
copy the hello world app into new source file
set additional include
set preproc defintions -> UNICODE & _UNICODE on
set linker libs

сборка ->

1>------ Build started: Project: wxtest, Configuration: Debug Win32 ------
1>Source.cpp
1>c:\work\wxwin\include\wx\wxcrt.h(487): error C3861: 'wxStrcoll': identifier not found
1>c:\work\wxwin\include\wx\wxcrt.h(487): message : 'wxStrcoll': function was not declared in the template definition context and can be found only via argument-dependent lookup in the instantiation context
1>c:\work\wxwin\include\wx\wxcrt.h(496): message : see reference to function template instantiation 'int wxStrcoll_String<const wchar_t*>(const wxString &,const T &)' being compiled
1>        with
1>        [
1>            T=const wchar_t *
1>        ]
1>Done building project "wxtest.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

1 Ответ

1 голос
/ 10 июля 2020

К сожалению, вам необходимо вручную изменить заголовок, чтобы исправить сборку с помощью MSVS 2019 в 3.0.5 и удалить defined(__VISUALC__) || часть проверки перед определением wxNEEDS_DECL_BEFORE_TEMPLATE в wx/wxcrt.h.

FWIW эту проблему был исправлен в течение длительного времени (~ 6 лет) в wx 3.1, и вы можете скомпилировать 3.1.3 или версию 3.1.4, которая скоро будет выпущена из коробки, с MSVS 2019.

...