wxwidgets - vs2019 wxwidgets 示例 hello world -> “未找到 wxstrcoll”
问题描述
似乎很多人都遇到了这个问题,但我似乎找不到解决方案。
遵循确切的说明,下载预编译的库,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 ==========
解决方案
defined(__VISUALC__) ||
不幸的是,您需要手动修改标头以在3.0.5 中使用 MSVS 2019 修复构建,并wxNEEDS_DECL_BEFORE_TEMPLATE
在wx/wxcrt.h
.
FWIW 这个问题在 wx 3.1 中已经修复了很长时间(约 6 年),您可以使用 MSVS 2019 编译 3.1.3 或即将发布的 3.1.4。
推荐阅读
- java - 将标签添加到pdf文件java
- c# - 部分视图中的 ng-app 和 ng-controller 不起作用
- c# - 如何仅从 WPF MVVM 中的调度程序线程以外的线程更新可观察集合中的属性?
- php - 如何按月对mysql中的concat进行分组并显示?
- django - django-auth-ldap 成员组不工作
- python - jira python api问题与search_issues给出不同的结果
- javascript - 如何使用 javascript 和 php 在 $_GET 处获取数组?
- mysql - 在所有表中插入单个 table_name 作为列值
- bash - 如果找到,则使用 awk 替换特定列值
- apache-spark - Hiw 在循环中插入数据框的列值