Discussion:
Troubles with tribbles - linking wx in a mingw(-32) build
Greg Jung
2014-09-30 21:09:28 UTC
Permalink
I've got a working (linux/windows/?) project that I want to add wxwidgets
to.
Actually, its Gnudatalanguage. Already, the code links and works with
wxwidgets on the Linux
end, but afaik no one has yet built this into the windows build. In most
other respects it operates
equivalently to its linux/x11 counterpart, and most code is shared. I'm
using i686 compilation
<< banter follows. You can skip down to THE ISSUE to save time. >>
So of course I have a long story of a litany of trial and error over the
last few days, ultimately I
come up with an executable that can't find "personality" in the MS STDC++-6
library; until now
I haven't need this library and I read this error arises from a mixture of
threading protocols; I was making
-mthread based wx while the rest of the build liked to get it from -pthread.

(excuse me while I puke in the toilet)

OK so I dont use the -mthread way in my other libraries, I tried to get the
wxWidgets to build without that
flag by deleting -mthreads references in Makefiles, but apparently that
wont work.

So I downloaded the pre-built binaries built via gcc4.8.1 on the TDM-mingw.
They use SLJ which is vaguely familiar
to me from when I last looked at the issue, so until I get mis-matching
personalities I'll figure its good.

<< THE ISSUE >>
The next hitch is an unresolved reference
CMakeFiles/gdl.dir/objects.a(dstructgdl.cpp.obj):dstructgdl.cpp:(.rdata[__ZTV20wxMDIParentFrameBase]+0x370):
undefined reference to wxNonOwnedWindow::DoSetPathShape(wxGraphicsPath
const&)

which arises from the wx/nonownedwnd.h file but only under the
predicate wxUSE_GRAPHICS_CONTEXT which
must be true in the caller but somehow the library doesn't include this
case. I've extracted all of the export symbols
of the TDM libraries into .def files via dlltool, and DOSetPathShape is
nowhere to be found.

nonownedwnd.h-88-
nonownedwnd.h-89-#if wxUSE_GRAPHICS_CONTEXT
nonownedwnd.h:90: virtual bool DoSetPathShape(const wxGraphicsPath&
WXUNUSED(path))
nonownedwnd.h-91- {
nonownedwnd.h-92- return false;
nonownedwnd.h-93- }
nonownedwnd.h-94-#endif // wxUSE_GRAPHICS_CONTEXT
then:
include/wx/msw/nonownedwnd.h-18-
include/wx/msw/nonownedwnd.h-19-class WXDLLIMPEXP_CORE wxNonOwnedWindow :
public wxNonOwnedWindowBase
include/wx/msw/nonownedwnd.h-20-{
include/wx/msw/nonownedwnd.h-21-public:
include/wx/msw/nonownedwnd.h-22- wxNonOwnedWindow();
include/wx/msw/nonownedwnd.h-23- virtual ~wxNonOwnedWindow();
include/wx/msw/nonownedwnd.h-24-
include/wx/msw/nonownedwnd.h-25-protected:
include/wx/msw/nonownedwnd.h-26- virtual bool DoClearShape();
include/wx/msw/nonownedwnd.h-27- virtual bool DoSetRegionShape(const
wxRegion& region);
include/wx/msw/nonownedwnd.h-28-#if wxUSE_GRAPHICS_CONTEXT
include/wx/msw/nonownedwnd.h:29: virtual bool DoSetPathShape(const
wxGraphicsPath& path);
include/wx/msw/nonownedwnd.h-30-
include/wx/msw/nonownedwnd.h-31-private:
include/wx/msw/nonownedwnd.h-32- wxNonOwnedWindowShapeImpl* m_shapeImpl;
include/wx/msw/nonownedwnd.h-33-#endif // wxUSE_GRAPHICS_CONTEXT
include/wx/msw/nonownedwnd.h-34-
include/wx/msw/nonownedwnd.h-35-
wxDECLARE_NO_COPY_CLASS(wxNonOwnedWindow);
include/wx/msw/nonownedwnd.h-36-};
include/wx/msw/nonownedwnd.h-37-
include/wx/msw/nonownedwnd.h-38-#endif // _WX_MSW_NONOWNEDWND_H_

So. what is this variable, and have I just answered my question, is it
something I have to set to 0 before compiling?
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Greg Jung
2014-09-30 22:42:53 UTC
Permalink
OK I've gone around this issue by compilition setting
wxUSE_GRAPHICS_CONTEXT=0 only to have it reset again
in setup.h where, MSC_VER or not, #define wxUSE_GRAPHICS_CONTEXT 1 happens
at line 367 of setup.h.
I bracketted that with #ifndef and got the program to build. 11+ MB to
load the new DLLs, I at least got my answer, which was a cock-block, nogo:

../../src/msw/thread.cpp(1339) assert "!wxThread::IsMain()" failed in
wxMutexGuiEnterImpl():
main thread doesn't want to block in wxMutexGuiEnter()!
I did have to bring in libstdc++-6.dll but this time it was happy (no
personality issues).
Post by Greg Jung
I've got a working (linux/windows/?) project that I want to add wxwidgets
to.
Actually, its Gnudatalanguage.
include/wx/msw/nonownedwnd.h-38-#endif // _WX_MSW_NONOWNEDWND_H_
So. what is this variable, and have I just answered my question, is it
something I have to set to 0 before compiling?
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Loading...