I built a toolchain host on Cygwin target for x86-64 Linux, now my project involves wxWidgets, Cross-Platform GUI Library. It works before involving wxWidgets libraries from native Linux.
I built wxWidgets on Debian then copied generated library files to the cygwin environment, my project passed compilation, linking and binary is executable on Linux, but it seems link to a wrong function in library of wxWidgets.
- [Correct] wxApp::Initialize() --> wxAppBase::Initialize() --> wxAppBase::OnInitGui()
- [Wrong] wxApp::Initialize() --> wxAppBase::Initialize() --> wxAppBase::SafeYieldFor()
``` bool wxAppBase::Initialize(int& argcOrig, wxChar **argvOrig) { .....
if ( !wxAppConsole::Initialize(argcOrig, argvOrig) )
return false;
wxInitializeStockLists();
wxBitmap::InitStandardHandlers();
// for compatibility call the old initialization function too
if ( !OnInitGui() )
return false;
return true;
} ```
Does anyone know why? or I cannot copy libraries from Linux directly, have to build wxWidgets on Cygwin through my toolchain?
Another doubt is what is the different about the libraries between build on native Linux and build on Cygwin? I think both they generate for the same target platfrom for x86-64 Linux.