There is something I cannot understand.
Phenomenon exists at least in WX 3.1.1 and 3.2.1
1) Windows 10. Downloaded full source, ran CMake, configured for VC x86 compiler, shared libraries, dynamic runtime && ninja build system. Included full samples building. Ran ninja, got WX + samples binaries. Executed stctest - got no syntax highlighting whatsoever.
Cleaned binaries. Invoked VC make on existing build/msw/makefile.vc from native x86 VC environment console, utilizing the config flags to create shared libraries, dynamic runtime. Got WX binaries, compiled stctest with x86 VC console, ran test and got syntax highlighting working OK.
Compared setup.h files configured under CMake and VC make, did not find any differences.
2) Linux Ubuntu. Same scenario, unpacked WX sources, ran CMake, configured all the same flags as for Windows iteration, see p1. Ran ninja build, got WX shared objects and samples, executed stctest - no syntax highlighting.
Alternatively, executed configure, make && make install, then make on samples, executed stctest, - got syntax highlighting working OK.
Something went sour for wxStyledTextCtrl, when building with CMake and ninja, and I cannot understand what it was exactly.
Did anyone experienced the same build tools outcome, or it was something only I have encountered?
wxStyledTextCtrl syntax highlighting depends on way WX is built. Time of miracles.
Re: wxStyledTextCtrl syntax highlighting depends on way WX is built. Time of miracles.
Hi,
Who is this ninja guy? I don't think anybody here is familiar with him?
If the officially supported tools produces working environment - stick with them. They are officially supported.
Thank you.
Who is this ninja guy? I don't think anybody here is familiar with him?
If the officially supported tools produces working environment - stick with them. They are officially supported.
Thank you.
-
- Super wx Problem Solver
- Posts: 466
- Joined: Tue Jun 20, 2006 6:47 pm
- Contact:
Re: wxStyledTextCtrl syntax highlighting depends on way WX is built. Time of miracles.
I think most of the syntax highlighting is done in the SurfaceImpl::DrawTextTransparent method in PlatWX.cpp file (located in the <wxroot>\src\stc\ folder of your wxWidgets source files). Can you try placing a break point in that method and trace through one or more calls to that method and see what fails with one build and not the other.
Re: wxStyledTextCtrl syntax highlighting depends on way WX is built. Time of miracles.
The cmake support is still relatively new. My guess is that in the cmake files the Scintilla lexers were forgotten.
In any case, please open a bug report at http://trac.wxwidgets.org
@ONEEYEMAN: https://ninja-build.org/
In any case, please open a bug report at http://trac.wxwidgets.org
@ONEEYEMAN: https://ninja-build.org/
Use the source, Luke!
-
- In need of some credit
- Posts: 7
- Joined: Thu Dec 20, 2018 6:25 pm
- Location: Moscow, Russia
- Contact:
Re: wxStyledTextCtrl syntax highlighting depends on way WX is built. Time of miracles.
Thanks for an advice. Created ticket 18306. At a glance, all lexer files are there, in CMakeLists.txt, and as soon as they are just singleton objects, created automatically, it should suffice.doublemax wrote:The cmake support is still relatively new. My guess is that in the cmake files the Scintilla lexers were forgotten.
In any case, please open a bug report at http://trac.wxwidgets.org
@ONEEYEMAN: https://ninja-build.org/
On the other hand, they listed with wx_add_builtin_library, which might not result in these being properly exported from wx_lib_link_libraries(stc PRIVATE wxscintilla)
Ah. They might be optimized out completely by linker, if I'm correct, the private static library is implicitly created, and later linked to the core (or base), do not remember wher stc resides. As soon as there is no explicit use of these global singletons, they may be just thrown away by the linker in that case.