Opened 5 years ago

Closed 4 months ago

#16813 closed defect (fixed)

wxGenericTimerImpl should use WXDLLIMPEXP_CORE

Reported by: marius Owned by: Vadim Zeitlin <vadim@…>
Priority: low Milestone:
Component: wxX11 Version: dev-latest
Keywords: Cygwin Cc:
Blocked By: Blocking:
Patch: no

Description

In file include/wx/generic/private/timer.h the class wxGenericTimerImpl should use WXDLLIMPEXP_CORE in order for the library to compile on cygwin using the options "--with-x11 --with-opengl".

Tested on the current github master:
SHA-1: 041f9a4cf2df55661388ace15d43164070b00085
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78420

Change History (6)

comment:1 Changed 4 years ago by oneeyeman

  • Patch set

comment:2 Changed 4 years ago by vadz

  • Keywords Cygwin added
  • Milestone 3.1.0 deleted
  • Patch unset
  • Priority changed from normal to low

I'm really not sure why is it so. E.g. wxMSWTimerImpl in git-wxWidgets:include/wx/msw/private/timer.h uses WXDLLIMPEXP_BASE without any problems, what's different about wxGenericTimerImpl?

It would probably be helpful to report the exact error.

Also, at first glance, all these wxXXXTimerImpl classes are private to the library and shouldn't be DLL-exported at all...

comment:3 Changed 4 months ago by stahta01

  • Cc stahta01@… added

Adding configure option --enable-monolithic will likely avoid this build error. Tim S.

comment:4 Changed 4 months ago by stahta01

  • Cc stahta01@… removed

Error message that happens

CPPFLAGS='-D_GNU_SOURCE' \
  ../configure --with-x11 --disable-mediactrl \
  --enable-debug --enable-unicode --with-opengl
g++ -shared -o /cygdrive/c/Users/stahta01/devel/open_source_code/version_control/git_repos/wxWidgets/build-x11-x86/lib/cygwx_x11univu_core-3.1-3.dll  coredll_event.o coredll_fs_mem.o coredll_msgout.o coredll_utilscmn.o   coredll_generic_caret.o coredll_generic_imaglist.o coredll_unix_dialup.o coredll_unix_fontenum.o coredll_unix_fontutil.o coredll_uiactionx11.o coredll_utilsx11.o coredll_unix_sound.o coredll_taskbarcmn.o coredll_unix_joystick.o coredll_taskbarx11.o coredll_generic_icon.o coredll_generic_textmeasure.o coredll_generic_timer.o coredll_x11_app.o coredll_x11_bitmap.o coredll_x11_brush.o coredll_x11_clipbrd.o coredll_x11_colour.o coredll_x11_cursor.o coredll_x11_data.o coredll_x11_dataobj.o coredll_x11_dc.o coredll_x11_dcclient.o coredll_x11_dcmemory.o coredll_x11_dcscreen.o coredll_x11_evtloop.o coredll_x11_font.o coredll_x11_minifram.o coredll_nanox.o coredll_x11_palette.o coredll_x11_pen.o coredll_x11_popupwin.o coredll_x11_region.o coredll_reparent.o coredll_x11_settings.o coredll_x11_toplevel.o coredll_x11_utils.o coredll_utilsx.o coredll_x11_window.o coredll_displayx11.o coredll_unix_apptraits.o coredll_animateg.o coredll_generic_accel.o coredll_clrpickerg.o coredll_collpaneg.o coredll_colrdlgg.o coredll_dirdlgg.o coredll_generic_fdrepdlg.o coredll_filedlgg.o coredll_filepickerg.o coredll_fontdlgg.o coredll_fontpickerg.o coredll_generic_listctrl.o coredll_mdig.o coredll_prntdlgg.o coredll_univ_anybutton.o coredll_univ_bmpbuttn.o coredll_univ_button.o coredll_univ_checkbox.o coredll_univ_checklst.o coredll_univ_choice.o coredll_univ_combobox.o coredll_univ_control.o coredll_ctrlrend.o coredll_univ_dialog.o coredll_framuniv.o coredll_univ_gauge.o coredll_inpcons.o coredll_inphand.o coredll_univ_listbox.o coredll_univ_menu.o coredll_univ_notebook.o coredll_univ_radiobox.o coredll_univ_radiobut.o coredll_scrarrow.o coredll_univ_scrolbar.o coredll_scrthumb.o coredll_settingsuniv.o coredll_univ_slider.o coredll_univ_spinbutt.o coredll_univ_statbmp.o coredll_univ_statbox.o coredll_univ_statline.o coredll_univ_stattext.o coredll_univ_statusbr.o coredll_stdrend.o coredll_univ_textctrl.o coredll_univ_tglbtn.o coredll_theme.o coredll_univ_toolbar.o coredll_topluniv.o coredll_winuniv.o coredll_generic_activityindicator.o coredll_gtk.o coredll_metal.o coredll_mono.o coredll_win32.o coredll_accelcmn.o coredll_accesscmn.o coredll_anidecod.o coredll_affinematrix2d.o coredll_appcmn.o coredll_artprov.o coredll_artstd.o coredll_arttango.o coredll_bmpbase.o coredll_bmpbtncmn.o coredll_bookctrl.o coredll_btncmn.o coredll_cairo.o coredll_checkboxcmn.o coredll_checklstcmn.o coredll_choiccmn.o coredll_clipcmn.o coredll_clrpickercmn.o coredll_colourcmn.o coredll_colourdata.o coredll_combocmn.o coredll_cmdproc.o coredll_cmndata.o coredll_containr.o coredll_cshelp.o coredll_ctrlcmn.o coredll_common_ctrlsub.o coredll_dcbase.o coredll_dcbufcmn.o coredll_dcgraph.o coredll_dcsvg.o coredll_dirctrlcmn.o coredll_dlgcmn.o coredll_dndcmn.o coredll_dobjcmn.o coredll_docmdi.o coredll_docview.o coredll_dpycmn.o coredll_dseldlg.o coredll_effects.o coredll_fddlgcmn.o coredll_filectrlcmn.o coredll_filehistorycmn.o coredll_filepickercmn.o coredll_fontpickercmn.o coredll_fldlgcmn.o coredll_fontcmn.o coredll_fontdata.o coredll_graphicc.o coredll_fontenumcmn.o coredll_fontmap.o coredll_fontutilcmn.o coredll_framecmn.o coredll_gaugecmn.o coredll_gbsizer.o coredll_gdicmn.o coredll_geometry.o coredll_gifdecod.o coredll_graphcmn.o coredll_headercolcmn.o coredll_headerctrlcmn.o coredll_helpbase.o coredll_iconbndl.o coredll_imagall.o coredll_imagbmp.o coredll_image.o coredll_imagfill.o coredll_imaggif.o coredll_imagiff.o coredll_imagjpeg.o coredll_imagpcx.o coredll_imagpng.o coredll_imagpnm.o coredll_imagtga.o coredll_imagtiff.o coredll_imagxpm.o coredll_layout.o coredll_lboxcmn.o coredll_listctrlcmn.o coredll_markupparser.o coredll_matrix.o coredll_menucmn.o coredll_modalhook.o coredll_mousemanager.o coredll_nbkbase.o coredll_overlaycmn.o coredll_ownerdrwcmn.o coredll_paper.o coredll_panelcmn.o coredll_persist.o coredll_pickerbase.o coredll_popupcmn.o coredll_preferencescmn.o coredll_prntbase.o coredll_quantize.o coredll_radiobtncmn.o coredll_radiocmn.o coredll_rearrangectrl.o coredll_rendcmn.o coredll_rgncmn.o coredll_scrolbarcmn.o coredll_settcmn.o coredll_sizer.o coredll_slidercmn.o coredll_spinbtncmn.o coredll_spinctrlcmn.o coredll_srchcmn.o coredll_statbar.o coredll_statbmpcmn.o coredll_statboxcmn.o coredll_statlinecmn.o coredll_stattextcmn.o coredll_stockitem.o coredll_tbarbase.o coredll_textcmn.o coredll_textentrycmn.o coredll_textmeasurecmn.o coredll_toplvcmn.o coredll_treebase.o coredll_uiactioncmn.o coredll_valgen.o coredll_validate.o coredll_valtext.o coredll_valnum.o coredll_wincmn.o coredll_windowid.o coredll_wrapsizer.o coredll_xpmdecod.o coredll_busyinfo.o coredll_buttonbar.o coredll_choicdgg.o coredll_choicbkg.o coredll_collheaderctrlg.o coredll_combog.o coredll_dcpsg.o coredll_dirctrlg.o coredll_dragimgg.o coredll_filectrlg.o coredll_headerctrlg.o coredll_generic_infobar.o coredll_listbkg.o coredll_logg.o coredll_markuptext.o coredll_msgdlgg.o coredll_numdlgg.o coredll_progdlgg.o coredll_preferencesg.o coredll_printps.o coredll_renderg.o coredll_richmsgdlgg.o coredll_scrlwing.o coredll_selstore.o coredll_spinctlg.o coredll_splitter.o coredll_srchctlg.o coredll_statbmpg.o coredll_stattextg.o coredll_textdlgg.o coredll_tipwin.o coredll_toolbkg.o coredll_treectlg.o coredll_treebkg.o coredll_vlbox.o coredll_vscroll.o coredll_xmlreshandler.o coredll_splash.o coredll_notifmsgg.o coredll_odcombo.o coredll_calctrlcmn.o coredll_grideditors.o coredll_bmpcboxcmn.o coredll_grid.o coredll_gridctrl.o coredll_hyperlinkg.o coredll_helpext.o coredll_sashwin.o coredll_gridsel.o coredll_addremovectrl.o coredll_tipdlg.o coredll_aboutdlgg.o coredll_gridcmn.o coredll_richtooltipcmn.o coredll_datectlg.o coredll_bannerwindow.o coredll_treelist.o coredll_datavcmn.o coredll_animatecmn.o coredll_odcombocmn.o coredll_hyperlnkcmn.o coredll_propdlg.o coredll_bmpcboxg.o coredll_richtooltipg.o coredll_timectrlg.o coredll_commandlinkbuttong.o coredll_notifmsgcmn.o coredll_wizard.o coredll_datavgen.o coredll_editlbox.o coredll_laywin.o coredll_calctrlg.o coredll_rowheightcache.o coredll_sound_sdl.o -L/cygdrive/c/Users/stahta01/devel/open_source_code/version_control/git_repos/wxWidgets/build-x11-x86/lib    -L/cygdrive/c/Users/stahta01/devel/open_source_code/version_control/git_repos/wxWidgets/build-x11-x86/lib  -Wl,--out-implib=/cygdrive/c/Users/stahta01/devel/open_source_code/version_control/git_repos/wxWidgets/build-x11-x86/lib/libwx_x11univu_core-3.1.dll.a         -lpangoxft-1.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lintl -lfontconfig -lfreetype -lXft -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lintl -lfontconfig -lfreetype -lX11 -lXext -lcairo -lpng -lz -ljpeg -ltiff  -lwxregexu-3.1  -lz -lpthread -liconv  -lwx_baseu-3.1 -lz -lpthread -liconv
coredll_generic_timer.o: In function `ZN18wxGenericTimerImplD2Ev':
/cygdrive/c/Users/stahta01/devel/open_source_code/version_control/git_repos/wxWidgets/build-x11-x86/../src/generic/timer.cpp:183: undefined reference to `_imp___ZTV18wxGenericTimerImpl'
coredll_generic_timer.o: In function `ZN18wxGenericTimerImplC1EP7wxTimer':
/cygdrive/c/Users/stahta01/devel/open_source_code/version_control/git_repos/wxWidgets/build-x11-x86/../include/wx/generic/private/timer.h:25: undefined reference to `_imp___ZTV18wxGenericTimerImpl'
coredll_x11_evtloop.o: In function `ZN14wxGUIEventLoop5DoRunEv':
/cygdrive/c/Users/stahta01/devel/open_source_code/version_control/git_repos/wxWidgets/build-x11-x86/../src/x11/evtloop.cpp:139: undefined reference to `_imp___ZN18wxGenericTimerImpl12NotifyTimersEv'
coredll_x11_evtloop.o: In function `ZN14wxGUIEventLoop10DoYieldForEl':
/cygdrive/c/Users/stahta01/devel/open_source_code/version_control/git_repos/wxWidgets/build-x11-x86/../src/x11/evtloop.cpp:262: undefined reference to `_imp___ZN18wxGenericTimerImpl12NotifyTimersEv'
coredll_reparent.o: In function `ZN12wxReparenter15WaitAndReparentEP8wxWindowP15wxAdoptedWindowRK8wxStringb':
/cygdrive/c/Users/stahta01/devel/open_source_code/version_control/git_repos/wxWidgets/build-x11-x86/../src/x11/reparent.cpp:172: undefined reference to `_imp___ZN18wxGenericTimerImpl12NotifyTimersEv'
collect2: error: ld returned 1 exit status
make: *** [Makefile:14148: /cygdrive/c/Users/stahta01/devel/open_source_code/version_control/git_repos/wxWidgets/build-x11-x86/lib/cygwx_x11univu_core-3.1-3.dll] Error 1

Last edited 4 months ago by stahta01 (previous) (diff)

comment:5 Changed 4 months ago by vadz

  • Status changed from new to confirmed

Looking at this closer, I agree that we need WXDLLIMPEXP_CORE here, this class is only defined in wxCore and not wxBase. I'll apply the original patch, better late than never.

comment:6 Changed 4 months ago by Vadim Zeitlin <vadim@…>

  • Owner set to Vadim Zeitlin <vadim@…>
  • Resolution set to fixed
  • Status changed from confirmed to closed

In 8ab9fed14/git-wxWidgets:

Fix wxGenericTimerImpl DLL declaration in wxX11 build

This class is defined in the core library, so use the appropriate
WXDLLIMPEXP macro.

Closes #16813.

Note: See TracTickets for help on using tickets.