wxStyledTextCtrl syntax highlighting depends on way WX is built. Time of miracles.

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
vgromov
In need of some credit
In need of some credit
Posts: 2
Joined: Thu Dec 20, 2018 6:25 pm

wxStyledTextCtrl syntax highlighting depends on way WX is built. Time of miracles.

Postby vgromov » Fri Dec 21, 2018 2:13 pm

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?

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 2834
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxStyledTextCtrl syntax highlighting depends on way WX is built. Time of miracles.

Postby ONEEYEMAN » Fri Dec 21, 2018 10:54 pm

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.

New Pagodi
Super wx Problem Solver
Super wx Problem Solver
Posts: 259
Joined: Tue Jun 20, 2006 6:47 pm
Contact:

Re: wxStyledTextCtrl syntax highlighting depends on way WX is built. Time of miracles.

Postby New Pagodi » Fri Dec 21, 2018 11:31 pm

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.

User avatar
doublemax
Moderator
Moderator
Posts: 12889
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxStyledTextCtrl syntax highlighting depends on way WX is built. Time of miracles.

Postby doublemax » Fri Dec 21, 2018 11:52 pm

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/
Use the source, Luke!

vgromov
In need of some credit
In need of some credit
Posts: 2
Joined: Thu Dec 20, 2018 6:25 pm

Re: wxStyledTextCtrl syntax highlighting depends on way WX is built. Time of miracles.

Postby vgromov » Sat Dec 22, 2018 4:31 am

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/


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.
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.


Return to “Compiler / Linking / IDE Related”

Who is online

Users browsing this forum: No registered users and 6 guests