Problems and solutions in compiling wxwidgets of MinGW

Source: Internet
Author: User
Tags wxwidgets

In fact, on-line wxwidgets compilation related blog post, did not write to the key point, generalities-wrote a few commands, it's all right! This page on Wikipedia explains the various problems and workarounds that may be encountered in compiling. Rather lazy, do not want to translate. Wxwidgets Chinese information is not much, English help, development manuals, books more comprehensive and meticulous, if you want to use wxwidgets will have to read these English materials. If the compilation of wxwidgets English documents can not understand, or do not use wxwidgets forget. I used to use MFC, WinForm, WPF as the Windows interface, but not across the platform, although. NET is really open source, but the WinForm and WPF porting plan has not yet set the stage. In addition, WinForm should not be ported to Linux, and the implementation of WinForm relies on the processing of graphical interfaces and messages in the Windows kernel. Wxwidgets and MFC in the message Processing, Dialog mode graphics program, frame-view-document mode graphics program and other aspects of comparison. In addition, wxwidgets is more flexible, more object-oriented, not so many macros, so # define constants, and event and event parameters are handled more like Winform;wxwidgets also support the interface layout. So decided to learn wxwidgets, knowledge span is not big.

I have encountered two problems in compiling.

First, the MinGW default with its own sh.exe this shell

Mingw32-make-f MAKEFILE.GCC build=release unicode=1 shared=0

Sh.exe is not the same as many of the Windows command line syntax and built-in commands. So directly with the above command will appear "cannot find the specified file" problem.

This version of the solution is to remove other versions of MinGW and Mysys from the system's path variable, leaving only one. Also add Shell=cmd.exe to the compile command.

Mingw32-make shell=cmd.exe-f makefile.gcc build=release unicode=1 shared=0

Second, compile to the end, when the link appears "the input line is too long."

Here are the commands that occurred during my compilation.

ar RCU C:\wxWidgets\lib\gcc_lib\libwxmsw30ud_core.a corelib_dummy.o corelib_event.o corelib_fs_mem.o CORELIB_MSGOUT.O CORELIB_UTILSCMN.O corelib_main.o corelib_mslu.o corelib_volume.o corelib_activex.o corelib_app.o CORELIB_BITMAP.O CORELIB_BRUSH.O corelib_caret.o corelib_clipbrd.o corelib_colour.o corelib_cursor.o corelib_data.o CORELIB_DC.O CORELIB_DCCLIENT.O corelib_dcmemory.o corelib_dcprint.o corelib_dcscreen.o corelib_dialup.o corelib_dib.o corelib_ DISPLAY.O corelib_enhmeta.o corelib_font.o corelib_fontenum.o corelib_fontutil.o corelib_gdiimage.o corelib_gdiobj.o CORELIB_GDIPLUS.O corelib_graphics.o corelib_icon.o corelib_imaglist.o corelib_minifram.o CORELIB_NONOWNEDWND.O CORELIB_DATAOBJ.O corelib_dropsrc.o corelib_droptgt.o corelib_oleutils.o corelib_safearray.o CORELIB_PALETTE.O CORELIB_PEN.O corelib_popupwin.o corelib_printdlg.o corelib_printwin.o corelib_region.o corelib_renderer.o corelib_ SETTINGS.O corelib_textmeasure.o CORELIB_TOOLTIP.O CORELIB_TOPLEVEL.O CORELIB_UIACTION.O CORELIB_UTILSGUI.O corelib_utilswin.o corelib_uxtheme.o corelib_window.o corelib_helpchm.o corelib_helpwin.o corelib _AUTOMTN.O corelib_uuid.o corelib_clrpickerg.o corelib_collpaneg.o corelib_filepickerg.o CORELIB_FONTPICKERG.O CORELIB_GENERIC_STATUSBR.O corelib_prntdlgg.o CORELIB_MSW_ACCEL.O corelib_anybutton.o corelib_artmsw.o corelib_msw_ BMPBUTTN.O corelib_msw_button.o corelib_msw_checkbox.o corelib_msw_choice.o corelib_colordlg.o corelib_combo.o CORELIB_MSW_COMBOBOX.O CORELIB_MSW_CONTROL.O corelib_msw_dialog.o corelib_dirdlg.o corelib_dragimag.o corelib_ EVTLOOP.O corelib_filedlg.o corelib_frame.o corelib_msw_gauge.o corelib_headerctrl.o corelib_iniconf.o corelib_msw_ LISTBOX.O CORELIB_MSW_LISTCTRL.O corelib_mdi.o corelib_msw_menu.o corelib_menuitem.o corelib_metafile.o corelib_ MSGDLG.O corelib_nativdlg.o corelib_nativewin.o corelib_msw_notebook.o corelib_access.o corelib_ownerdrw.o corelib_ PANEL.O CORELIB_PROGDLG.O corelib_msw_radiobox.o CORELIB_MSW_RADIOBUT.O corelib_richmsgdlg.o CORELIB_MSW_SCROLBAR.O corelib_msw_slider.o corelib_msw_spinbutt.o CORELIB_SPINCTRL.O corelib_msw_statbmp.o corelib_ MSW_STATBOX.O corelib_statusbar.o corelib_msw_statline.o corelib_msw_stattext.o corelib_msw_toolbar.o corelib_msw_ TEXTCTRL.O corelib_textentry.o corelib_msw_tglbtn.o CORELIB_TREECTRL.O corelib_msw_checklst.o corelib_msw_ FDREPDLG.O corelib_fontdlg.o corelib_accelcmn.o corelib_accesscmn.o corelib_anidecod.o CORELIB_AFFINEMATRIX2D.O CORELIB_APPCMN.O corelib_artprov.o corelib_artstd.o corelib_arttango.o corelib_bmpbase.o corelib_bmpbtncmn.o corelib _BOOKCTRL.O corelib_btncmn.o corelib_cairo.o corelib_checkboxcmn.o corelib_checklstcmn.o corelib_choiccmn.o corelib_ CLIPCMN.O corelib_clrpickercmn.o corelib_colourcmn.o corelib_colourdata.o corelib_combocmn.o CORELIB_CMDPROC.O CORELIB_CMNDATA.O corelib_containr.o corelib_cshelp.o corelib_ctrlcmn.o corelib_ctrlsub.o corelib_dcbase.o corelib_ DCBUFCMN.O corelib_dcgraph.o corelib_dcsvg.o corelib_dirctrlcmn.o corelib_dlgcmn.o CORELIB_DNDCMN.O corelib_dobjcmn.o corelib_docmdi.o corelib_docview.o corelib_dpycmn.o corelib_dseldlg.o CORELIB_EFFECTS.O CORELIB_FDDLGCMN.O corelib_filectrlcmn.o CORELIB_FILEHISTORYCMN.O CORELIB_FILEPICKERCMN.O CORELIB_FONTPICKERCMN.O CORELIB_FLDLGCMN.O corelib_fontcmn.o corelib_fontdata.o corelib_graphicc.o corelib_fontenumcmn.o CORELIB_FONTMAP.O CORELIB_FONTUTILCMN.O corelib_framecmn.o corelib_gaugecmn.o corelib_gbsizer.o corelib_gdicmn.o corelib_geometry.o CORELIB_GIFDECOD.O corelib_graphcmn.o corelib_headercolcmn.o corelib_headerctrlcmn.o corelib_helpbase.o corelib_ ICONBNDL.O CORELIB_IMAGALL.O corelib_imagbmp.o corelib_image.o corelib_imagfill.o corelib_imaggif.o corelib_ IMAGIFF.O corelib_imagjpeg.o corelib_imagpcx.o corelib_imagpng.o corelib_imagpnm.o corelib_imagtga.o corelib_ IMAGTIFF.O corelib_imagxpm.o corelib_layout.o corelib_lboxcmn.o corelib_listctrlcmn.o corelib_markupparser.o corelib _MATRIX.O corelib_menucmn.o corelib_modalhook.o corelib_mousemanager.o corelib_nbkbase.o corelib_overLAYCMN.O corelib_ownerdrwcmn.o corelib_paper.o corelib_panelcmn.o corelib_persist.o corelib_pickerbase.o corelib_ POPUPCMN.O corelib_preferencescmn.o corelib_prntbase.o corelib_quantize.o corelib_radiobtncmn.o CORELIB_RADIOCMN.O CORELIB_REARRANGECTRL.O corelib_rendcmn.o corelib_rgncmn.o corelib_scrolbarcmn.o corelib_settcmn.o corelib_sizer.o CORELIB_SLIDERCMN.O corelib_spinbtncmn.o corelib_spinctrlcmn.o corelib_srchcmn.o corelib_statbar.o corelib_ STATBMPCMN.O corelib_statboxcmn.o corelib_statlinecmn.o corelib_stattextcmn.o corelib_stockitem.o corelib_ TBARBASE.O corelib_textcmn.o corelib_textentrycmn.o corelib_textmeasurecmn.o corelib_toplvcmn.o CORELIB_TREEBASE.O CORELIB_UIACTIONCMN.O corelib_valgen.o corelib_validate.o corelib_valtext.o corelib_valnum.o CORELIB_WINCMN.O CORELIB_WINDOWID.O corelib_wrapsizer.o corelib_xpmdecod.o corelib_busyinfo.o corelib_buttonbar.o CORELIB_CHOICDGG.O CORELIB_CHOICBKG.O corelib_combog.o corelib_dcpsg.o corelib_dirctrlg.o corelib_dragimgg.o Corelib_filecTRLG.O corelib_headerctrlg.o corelib_infobar.o corelib_listbkg.o corelib_logg.o corelib_markuptext.o corelib_ MSGDLGG.O corelib_numdlgg.o corelib_progdlgg.o corelib_preferencesg.o corelib_printps.o corelib_renderg.o corelib_ RICHMSGDLGG.O corelib_scrlwing.o corelib_selstore.o corelib_spinctlg.o corelib_splitter.o corelib_srchctlg.o corelib _STATBMPG.O corelib_stattextg.o corelib_textdlgg.o corelib_tipwin.o corelib_toolbkg.o corelib_treectlg.o corelib_ TREEBKG.O CORELIB_VLBOX.O CORELIB_VSCROLL.O CORELIB_XMLRESHANDLER.O

The n-Multiple obj file that is not compiled is linked to the Libwxmsw30ud_core.a library, which exceeds the longest command required by the Windows command line, so it cannot be executed. The above command or I manually modified, or longer, this is already a page of Word document is not fit.

The solution to this problem should be flexible, and Wikipedia says replace $ (monolib_objects) with gcc_mswu\monolib*.o. This is a place where the problem is sure to occur when compiling into a library. But I still compile it into a distributed library, but it's a problem when I link libwxmsw30ud_core.a. Then the change is not the same.

Replace $ (corelib_objects) with GCC_MSWUD\CORELIB*.O in the following place . Note the directory name and file name prefix, I am the problem when compiling debug version, so the directory is gcc_mswud. Note that after the compilation is complete and replaced, if you do not replace the release version, you will also find the obj file from the debug version of the directory to link.

Makefile in the definition of $ (baselib_objects), $ (netlib_objects), $ (corelib_objects), $ (monolib_objects), the problem changed that, do not die copy.

Problems and solutions in compiling wxwidgets of MinGW

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.