Ubuntu can't link wxStyledTextCtrl Topic is solved
Ubuntu can't link wxStyledTextCtrl
Hi,
I want to use the wxStyledTextCtrl for viewing and modifying XML.
Compile and Link under macOS with wxWidgets 3.1.3 is OK and works perfectly.
But all Linux distributions compile, but do not link because the wxStyledTextCtrl is unresolved. (wxWidgets 3.0.4)
Any suggestions?
I want to use the wxStyledTextCtrl for viewing and modifying XML.
Compile and Link under macOS with wxWidgets 3.1.3 is OK and works perfectly.
But all Linux distributions compile, but do not link because the wxStyledTextCtrl is unresolved. (wxWidgets 3.0.4)
Any suggestions?
Re: Ubuntu can't link wxStyledTextCtrl
Hi,
stc is usually compiled as a different library and named appropriately (something like libwx*stc).
Try browsing the appropriate repository and install the appropriate binary.
Thank you.
stc is usually compiled as a different library and named appropriately (something like libwx*stc).
Try browsing the appropriate repository and install the appropriate binary.
Thank you.
Re: Ubuntu can't link wxStyledTextCtrl
Hi,
How do you link? What is your wx-config linker line?
I ask because you're likely tripping over this change.
Regards,
David
How do you link? What is your wx-config linker line?
I ask because you're likely tripping over this change.
Regards,
David
Re: Ubuntu can't link wxStyledTextCtrl
Hi David,
I add the stc in the libs line:
Now it compiles under Linux, but under Windows this seems not to do the trick.
I add the stc in the libs line:
Code: Select all
--libs core,base,aui,stc
Code: Select all
a ../winbin/librocutils.a `/usr/x86_64-w64-mingw32/bin/wx-config --libs core,base,aui,stc` -static-libgcc -static -liphlpapi -lmpr -lmswsock -lws2_32 -ladvapi32
/usr/x86_64-w64-mingw32/lib/libwx_mswu-3.0-x86_64-w64-mingw32.a(monolib_stc.o):stc.cpp:(.text+0x17a1): Warnung: undefinierter Verweis auf »Scintilla_LinkLexers«
/usr/x86_64-w64-mingw32/lib/libwx_mswu-3.0-x86_64-w64-mingw32.a(monolib_PlatWX.o):PlatWX.cpp:(.text+0x1f4f): Warnung: undefinierter Verweis auf »UTF8Length(wchar_t const*, unsigned int)«
/usr/x86_64-w64-mingw32/lib/libwx_mswu-3.0-x86_64-w64-mingw32.a(monolib_PlatWX.o):PlatWX.cpp:(.text+0x1fa8): Warnung: undefinierter Verweis auf »UTF8FromUTF16(wchar_t const*, unsigned int, char*, unsigned int)«
Re: Ubuntu can't link wxStyledTextCtrl
Hi,
What did you use under Windows to compile the library? With what options?
Thank you.
What did you use under Windows to compile the library? With what options?
Thank you.
Re: Ubuntu can't link wxStyledTextCtrl
Hi,
this is the configure line:
this is the configure line:
Code: Select all
../configure --prefix=/usr/x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-msw --enable-unicode --enable-mslu --disable-shared --enable-graphics_ctx --enable-monolithic
Re: Ubuntu can't link wxStyledTextCtrl
Build the "stc" sample and check its linker command.
Under Windows, but using Visual Studio, i see two libraries related to stc:
wxmsw31ud_stc.lib and wxscintilla.lib
I would suspect you're missing the second one. (the names will be different when using mingw though).
Under Windows, but using Visual Studio, i see two libraries related to stc:
wxmsw31ud_stc.lib and wxscintilla.lib
I would suspect you're missing the second one. (the names will be different when using mingw though).
Use the source, Luke!
Re: Ubuntu can't link wxStyledTextCtrl
I did add to the configure line --enable-stc
The wx build is running...
The wx build is running...
Re: Ubuntu can't link wxStyledTextCtrl
I have included stc in the --libs, but still no luck:
The wx Build does list up stc:
The generated wx libraries:
Any help is very appreciated.
Code: Select all
... `/usr/x86_64-w64-mingw32/bin/wx-config --libs core,base,aui,stc` -static-libgcc -static -liphlpapi -lmpr -lmswsock -lws2_32 -ladvapi32
/usr/x86_64-w64-mingw32/lib/libwx_mswu-3.0-x86_64-w64-mingw32.a(monolib_stc.o):stc.cpp:(.text+0x1f81): undefined reference to `Scintilla_LinkLexers'
/usr/x86_64-w64-mingw32/lib/libwx_mswu-3.0-x86_64-w64-mingw32.a(monolib_PlatWX.o):PlatWX.cpp:(.text+0x201f): undefined reference to `UTF8Length(wchar_t const*, unsigned int)'
/usr/x86_64-w64-mingw32/lib/libwx_mswu-3.0-x86_64-w64-mingw32.a(monolib_PlatWX.o):PlatWX.cpp:(.text+0x2078): undefined reference to `UTF8FromUTF16(wchar_t const*, unsigned int, char*, unsigned int)'
Code: Select all
Available libraries in this build are:
xrc webview stc richtext ribbon propgrid aui gl html qa adv core xml net base
Re: Ubuntu can't link wxStyledTextCtrl
the --libs all does not show stc:
Code: Select all
pi@raspi9:~ $ /usr/x86_64-w64-mingw32/bin/wx-config --libs all
-Wl,--subsystem,windows -mwindows /usr/x86_64-w64-mingw32/lib/libwx_mswu-3.0-x86_64-w64-mingw32.a -lwxregexu-3.0-x86_64-w64-mingw32 -lwxexpat-3.0-x86_64-w64-mingw32 -lwxtiff-3.0-x86_64-w64-mingw32 -lwxjpeg-3.0-x86_64-w64-mingw32 -lwxpng-3.0-x86_64-w64-mingw32 -lwxzlib-3.0-x86_64-w64-mingw32 -lrpcrt4 -loleaut32 -lole32 -luuid -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -ladvapi32 -lwsock32 -lgdi32
Re: Ubuntu can't link wxStyledTextCtrl
It seems this configure parameter
--enable-mslu
does screw up things...
--enable-mslu
does screw up things...
-
- Super wx Problem Solver
- Posts: 469
- Joined: Tue Jun 20, 2006 6:47 pm
- Contact:
Re: Ubuntu can't link wxStyledTextCtrl
When linking statically, you also need to include the scintilla library (wxscintilla-3.0-x86_64-w64-mingw32.a based on the picture you posted above).
Re: Ubuntu can't link wxStyledTextCtrl
Yes, that did work.New Pagodi wrote: ↑Thu May 23, 2019 2:05 pm When linking statically, you also need to include the scintilla library (wxscintilla-3.0-x86_64-w64-mingw32.a based on the picture you posted above).
I will try the master branch...
Re: Ubuntu can't link wxStyledTextCtrl
Hi,
Also, --enable-monolithic might be the culprit...
Why do you need this one?
Thank you.
Also, --enable-monolithic might be the culprit...
Why do you need this one?
Thank you.
Re: Ubuntu can't link wxStyledTextCtrl
I switch for win32/64 to the master branch 3.1.3.
Without changing anything in the build process the scintilla library is included automatically.
BTW: Both win32 and win64 are cross compiled on an RPi with Raspbian and mingw.
Without changing anything in the build process the scintilla library is included automatically.
BTW: Both win32 and win64 are cross compiled on an RPi with Raspbian and mingw.