"wx.rc" not found on MSYS2/W64 on Win10

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
francis33y
Experienced Solver
Experienced Solver
Posts: 70
Joined: Wed Feb 13, 2008 9:21 am
Location: Montpellier, France

"wx.rc" not found on MSYS2/W64 on Win10

Post by francis33y »

Hello

I am trying hard to compile my software as a 64 bit app on Win10. I installed MSYS2 today with latest wx305 and latest gcc w64 toolchain

When I do wx-config --rescomp I get:

Code: Select all

windres --include-dir C:/msys64/mingw64/include/wx-3.0 --define __WIN32__ --define __GNUWIN32__ --define WX_CPU_AMD64
But when I run the make, it gives an error with winres:

Code: Select all

`wx-config --rescomp` --use-temp-file -iresources.rc -oresources.o
resources.rc:3:10: fatal error: wx/msw/wx.rc: No such file or directory
    3 | #include "wx/msw/wx.rc"
      |          ^~~~~~~~~~~~~~
compilation terminated.
C:\msys64\mingw64\bin\windres.exe: C:\msys64\mingw64\bin\gcc a termin▒ avec le statut 1
make: *** [Makefile6.win:15 : resources.o] Erreur 1
I don't understand why it can't find wx.rc which I have at:

Code: Select all

 locate wx.rc
/mingw64/include/wx-3.0/wx/msw/wx.rc
Any help would be appreciated !

F
francis33y
Experienced Solver
Experienced Solver
Posts: 70
Joined: Wed Feb 13, 2008 9:21 am
Location: Montpellier, France

Re: "wx.rc" not found on MSYS2/W64 on Win10

Post by francis33y »

In addition, I am surprised to see __WIN32__ and __GNUWIN32__ while I am trying to build a 64 bits app !
iwbnwif
Super wx Problem Solver
Super wx Problem Solver
Posts: 282
Joined: Tue Mar 19, 2013 8:52 pm

Re: "wx.rc" not found on MSYS2/W64 on Win10

Post by iwbnwif »

I was fighting with a similar problem yesterday. It turned out to be a problem with the MSYS2 version of windres relating to parsing include paths, however my case may have been different as I have the include files on D: drive.

In the end, I used the mingw-64 (https://sourceforge.net/projects/mingw-w64/) version of windres which works fine with MSYS2.
wxWidgets 3.1.2, MinGW64 8.1.0, g++ 8.1.0, Ubuntu 19.04, Windows 10, CodeLite + wxCrafter
Some people, when confronted with a GUI problem, think "I know, I'll use Eclipse RCP". Now they have two problems.
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4204
Joined: Sun Jan 03, 2010 5:45 pm

Re: "wx.rc" not found on MSYS2/W64 on Win10

Post by PB »

With newer GCC, --use-temp-file made windres not working, see
https://github.com/msys2/MINGW-packages/issues/6558

And AFAIK, those WIN32 defines just mean that Win32 API is used and it has no relation to the actual binary bitness.
Last edited by PB on Tue Oct 06, 2020 4:32 pm, edited 1 time in total.
francis33y
Experienced Solver
Experienced Solver
Posts: 70
Joined: Wed Feb 13, 2008 9:21 am
Location: Montpellier, France

Re: "wx.rc" not found on MSYS2/W64 on Win10

Post by francis33y »

responding to myself (but still having problems and no solution):

Instead of using the package wxwidgets 3.0.5 of mingw 64 bits which is using shared DLLs, I removed it and tried to compile the sources with

Code: Select all

./configure --enable-monolithic --disable-shared  --enable-unicode --disable-threads --disable-xrc
which works fine

Code: Select all

...
Configured wxWidgets 3.0.5 for `x86_64-w64-mingw32'

  Which GUI toolkit should wxWidgets use?                 msw
  Should wxWidgets be compiled into single library?       yes
  Should wxWidgets be linked as a shared library?         no
  Should wxWidgets support Unicode?                       yes (using wchar_t)
  What level of wxWidgets compatibility should be enabled?
                                       wxWidgets 2.6      no
                                       wxWidgets 2.8      yes
  Which libraries should wxWidgets use?
                                       STL                no
                                       jpeg               sys
                                       png                sys
                                       regex              builtin
                                       tiff               sys
                                       zlib               sys
                                       expat              sys
                                       libmspack          no
                                       sdl                no
but the make process stops later with a strange error:

Code: Select all

/c/Users/XCY/Desktop/wx305/bk-deps g++ -c -o monolib_mediactrl_am.o -I./.pch/wxprec_monolib -D__WXMSW__      -DWXBUILDING      -I./src/regex  -I./src/stc/scintilla/include -I./src/stc/scintilla/lexlib -I./src/stc/scintilla/src -D__WX__ -DSCI_LEXER -DLINK_LEXERS -DwxUSE_BASE=1  -Wall -Wundef -Wunused-parameter -Wno-ctor-dtor-privacy -Woverloaded-virtual -D_FILE_OFFSET_BITS=64 -I/c/Users/XCY/Desktop/wx305/lib/wx/include/msw-unicode-static-3.0 -I./include -DWX_PRECOMP -O2 -fno-strict-aliasing  ./src/msw/mediactrl_am.cpp
./src/msw/mediactrl_am.cpp: In member function 'void wxAMMediaEvtHandler::OnActiveX(wxActiveXEvent&)':
./src/msw/mediactrl_am.cpp:2234:10: error: narrowing conversion of '4294966687' from 'unsigned int' to 'long int' [-Wnarrowing]
 2234 |     case 0xfffffd9f: // readystatechange in IActiveMovie2 and IMediaPlayer
      |          ^~~~~~~~~~
make: *** [Makefile:28673 : monolib_mediactrl_am.o] Erreur 1
I am stuck again ! Help appreciated ...

F
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4204
Joined: Sun Jan 03, 2010 5:45 pm

Re: "wx.rc" not found on MSYS2/W64 on Win10

Post by PB »

francis33y wrote: Tue Oct 06, 2020 4:32 pm but the make process stops later with a strange error:
I believe that this may be the same issue that was somehow fixed only in 3.1 branch here: https://github.com/wxWidgets/wxWidgets/pull/887

From my experience, using old wxWidgets versions (3.0 is about 5 years old) with new compilers may not be the best idea.

BTW, I am not really familiar with MSYS, but I thought that unlike when using a regular MinGW, you can / are expected to just use the provided prebuilt package, e.g. https://packages.msys2.org/base/mingw-w64-wxWidgets

I do not use wx-config but I can attest that wxWidgets 3.1.4 builds with the current MSYS2 mingw-w64-i686-toolchain using the bundled GCC makefile.
francis33y
Experienced Solver
Experienced Solver
Posts: 70
Joined: Wed Feb 13, 2008 9:21 am
Location: Montpellier, France

Re: "wx.rc" not found on MSYS2/W64 on Win10

Post by francis33y »

Thanks to both of you

First, I removed the "--use-temp-file " for winres and it solved the "wx.rc" problem as you said !

Second, I succeeded in compiling wx305 on my MinGW64/Win10 (since the corresponding package is using DLLs and I want a monolithic app) with an additionnal option to disable mediactrl. Also I switched to the right dir: "build/msw" (I didn't pay attention to it previously)...Everything works fine but when I launch my app from Win10, it requires 2 DLLs for jpg and png.

Then, I decided to compile again with the mediactrl enabled... I'll check if it solves this requirement for 2 DLLs... when the compilation will end.

To answer your comment on "why 3.0.5 ?" it is just the recommended "stable" version that I supposed will not require any upgrade on my source code.

If you think I am misleaded, please tell me where to go to avoir this external DLL requirement.

Again, many thanks for your super valuable help !

F
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4204
Joined: Sun Jan 03, 2010 5:45 pm

Re: "wx.rc" not found on MSYS2/W64 on Win10

Post by PB »

(Once again, I do not use configure/wx-config)

Regarding the image format DLLs needed even in the static build, I would try switching these libraries from "sys" to "builtin" to see if it helps.

BTW, are you sure your application will not require any compiler DLLs? With MinGW makefiles, static wxWidgets build or not, for 32-bit executable built with mingw-w64-i686-gcc at least these GCC DLLs are needed:

Code: Select all

libgcc_s_dw2-1.dll
libstdc++-6.dll
libwinpthread-1.dll
and one has to pass

Code: Select all

LDFLAGS="-static"
to the make to link them statically.

But I guess this is different with configure, either way this is easy to test running the .exe on a computer where there is no GCC bin folder in the path.
francis33y
Experienced Solver
Experienced Solver
Posts: 70
Joined: Wed Feb 13, 2008 9:21 am
Location: Montpellier, France

Re: "wx.rc" not found on MSYS2/W64 on Win10

Post by francis33y »

Based on your advice, I switched to 3.1.4 and compiled it with

Code: Select all

 ../../configure --enable-monolithic --disable-shared  --enable-unicode --disable-threads --disable-xrc
configure: loading site script /mingw64/etc/config.site
checking build system type... x86_64-w64-mingw32
checking host system type... x86_64-w64-mingw32
checking for --disable-gui... no
checking for --enable-monolithic... yes
checking for --enable-plugins... no
checking for --without-subdirs... no
checking for --enable-official_build... no
checking for --disable-all-features... no
checking for --enable-universal... no
checking for --enable-nanox... no
checking for --enable-gpe... no
checking for toolkit... msw
checking for --with-libpng... yes
checking for --with-libjpeg... yes
checking for --with-libtiff... yes
checking for --without-libjbig... no
checking for --without-liblzma... no
checking for --with-libxpm... yes
checking for --with-libiconv... yes
checking for --with-libmspack... no
checking for --without-gtkprint... no
checking for --with-gnomevfs... no
checking for --with-libnotify... yes
checking for --with-hildon... no
checking for --with-opengl... auto
checking for --with-dmalloc... no
checking for --with-sdl... no
checking for --with-regex... yes
checking for --with-zlib... yes
checking for --with-expat... yes
checking for --with-macosx-sdk...
checking for --with-macosx-version-min...
checking for --enable-debug... default
checking for --disable-debug_flag... no
checking for --enable-debug_info... no
checking for --enable-debug_gdb... no
checking for --enable-debug_cntxt... no
checking for --enable-mem_tracing... no
checking for --disable-shared... yes
checking for --enable-stl... no
checking for --enable-std_containers... no
checking for --enable-std_iostreams... yes
checking for --enable-std_string... yes
checking for --enable-std_string_conv_in_wxstring... no
checking for --disable-unicode... no
checking for --enable-mslu... no
checking for --enable-utf8... no
checking for --enable-utf8only... no
checking for --enable-extended_rtti... no
checking for --disable-optimise... no
checking for --enable-profile... no
checking for --enable-no_rtti... no
checking for --enable-no_exceptions... no
checking for --enable-permissive... no
checking for --enable-no_deps... no
checking for --disable-vararg_macros... no
checking for --enable-universal_binary... no
checking for --enable-macosx_arch... no
checking for --enable-compat26... no
checking for --disable-compat28... no
checking for --disable-rpath... no
checking for --enable-objc_uniquifying... no
checking for --disable-visibility... no
checking for --disable-tls... no
checking for --enable-intl... yes
checking for --enable-xlocale... yes
checking for --enable-config... yes
checking for --enable-protocols... yes
checking for --enable-ftp... yes
checking for --enable-http... yes
checking for --enable-fileproto... yes
checking for --enable-sockets... yes
checking for --enable-ipv6... no
checking for --enable-ole... yes
checking for --enable-dataobj... yes
checking for --enable-ipc... yes
checking for --enable-baseevtloop... yes
checking for --enable-epollloop... yes
checking for --enable-selectloop... yes
checking for --enable-any... yes
checking for --enable-apple_ieee... yes
checking for --enable-arcstream... yes
checking for --enable-base64... yes
checking for --enable-backtrace... yes
checking for --enable-catch_segvs... yes
checking for --enable-cmdline... yes
checking for --enable-datetime... yes
checking for --enable-debugreport... yes
checking for --enable-dialupman... yes
checking for --enable-dynlib... yes
checking for --enable-dynamicloader... yes
checking for --enable-exceptions... yes
checking for --enable-ffile... yes
checking for --enable-file... yes
checking for --enable-filehistory... yes
checking for --enable-filesystem... yes
checking for --enable-fontenum... yes
checking for --enable-fontmap... yes
checking for --enable-fs_archive... yes
checking for --enable-fs_inet... yes
checking for --enable-fs_zip... yes
checking for --enable-fsvolume... yes
checking for --enable-fswatcher... yes
checking for --enable-geometry... yes
checking for --enable-log... yes
checking for --enable-longlong... yes
checking for --enable-mimetype... yes
checking for --enable-printfposparam... yes
checking for --enable-snglinst... yes
checking for --enable-sound... yes
checking for --enable-stdpaths... yes
checking for --enable-stopwatch... yes
checking for --enable-streams... yes
checking for --enable-sysoptions... yes
checking for --enable-tarstream... yes
checking for --enable-textbuf... yes
checking for --enable-textfile... yes
checking for --enable-timer... yes
checking for --enable-variant... yes
checking for --enable-zipstream... yes
checking for --enable-url... yes
checking for --enable-protocol... yes
checking for --enable-protocol_http... yes
checking for --enable-protocol_ftp... yes
checking for --enable-protocol_file... yes
checking for --enable-threads... no
checking for --enable-iniconf... no
checking for --enable-regkey... yes
checking for --enable-docview... yes
checking for --enable-help... yes
checking for --enable-mshtmlhelp... yes
checking for --enable-html... yes
checking for --enable-htmlhelp... yes
checking for --enable-xrc... no
checking for --enable-aui... yes
checking for --enable-propgrid... yes
checking for --enable-ribbon... yes
checking for --enable-stc... yes
checking for --enable-constraints... yes
checking for --enable-loggui... yes
checking for --enable-logwin... yes
checking for --enable-logdialog... yes
checking for --enable-mdi... yes
checking for --enable-mdidoc... yes
checking for --enable-mediactrl... auto
checking for --enable-gstreamer8... no
checking for --enable-richtext... yes
checking for --enable-postscript... yes
checking for --enable-printarch... yes
checking for --enable-svg... yes
checking for --enable-webkit... yes
checking for --enable-webview... yes
checking for --enable-graphics_ctx... yes
checking for --enable-clipboard... yes
checking for --enable-dnd... yes
checking for --disable-controls... no
checking for --enable-markup... yes
checking for --enable-accel... yes
checking for --enable-animatectrl... yes
checking for --enable-bannerwindow... yes
checking for --enable-artstd... yes
checking for --enable-arttango... auto
checking for --enable-bmpbutton... yes
checking for --enable-bmpcombobox... yes
checking for --enable-button... yes
checking for --enable-calendar... yes
checking for --enable-caret... yes
checking for --enable-checkbox... yes
checking for --enable-checklst... yes
checking for --enable-choice... yes
checking for --enable-choicebook... yes
checking for --enable-collpane... yes
checking for --enable-colourpicker... yes
checking for --enable-combobox... yes
checking for --enable-comboctrl... yes
checking for --enable-commandlinkbutton... yes
checking for --enable-dataviewctrl... yes
checking for --enable-datepick... yes
checking for --enable-detect_sm... yes
checking for --enable-dirpicker... yes
checking for --enable-display... yes
checking for --enable-editablebox... yes
checking for --enable-filectrl... yes
checking for --enable-filepicker... yes
checking for --enable-fontpicker... yes
checking for --enable-gauge... yes
checking for --enable-grid... yes
checking for --enable-headerctrl... yes
checking for --enable-hyperlink... yes
checking for --enable-imaglist... yes
checking for --enable-infobar... yes
checking for --enable-listbook... yes
checking for --enable-listbox... yes
checking for --enable-listctrl... yes
checking for --enable-notebook... yes
checking for --enable-notifmsg... yes
checking for --enable-odcombobox... yes
checking for --enable-popupwin... yes
checking for --enable-prefseditor... yes
checking for --enable-radiobox... yes
checking for --enable-radiobtn... yes
checking for --enable-richmsgdlg... yes
checking for --enable-richtooltip... yes
checking for --enable-rearrangectrl... yes
checking for --enable-sash... yes
checking for --enable-scrollbar... yes
checking for --enable-searchctrl... yes
checking for --enable-slider... yes
checking for --enable-spinbtn... yes
checking for --enable-spinctrl... yes
checking for --enable-splitter... yes
checking for --enable-statbmp... yes
checking for --enable-statbox... yes
checking for --enable-statline... yes
checking for --enable-stattext... yes
checking for --enable-statusbar... yes
checking for --enable-taskbaricon... yes
checking for --enable-tbarnative... yes
checking for --enable-textctrl... yes
checking for --enable-timepick... yes
checking for --enable-tipwindow... yes
checking for --enable-togglebtn... yes
checking for --enable-toolbar... yes
checking for --enable-toolbook... yes
checking for --enable-treebook... yes
checking for --enable-treectrl... yes
checking for --enable-treelist... yes
checking for --enable-commondlg... yes
checking for --enable-aboutdlg... yes
checking for --enable-choicedlg... yes
checking for --enable-coldlg... yes
checking for --enable-filedlg... yes
checking for --enable-finddlg... yes
checking for --enable-fontdlg... yes
checking for --enable-dirdlg... yes
checking for --enable-msgdlg... yes
checking for --enable-numberdlg... yes
checking for --enable-splash... yes
checking for --enable-textdlg... yes
checking for --enable-tipdlg... yes
checking for --enable-progressdlg... yes
checking for --enable-wizarddlg... yes
checking for --enable-menus... yes
checking for --enable-miniframe... yes
checking for --enable-tooltips... yes
checking for --enable-splines... yes
checking for --enable-mousewheel... yes
checking for --enable-validators... yes
checking for --enable-busyinfo... yes
checking for --enable-hotkey... auto
checking for --enable-joystick... yes
checking for --enable-metafile... auto
checking for --enable-dragimage... yes
checking for --enable-accessibility... no
checking for --enable-uiactionsim... yes
checking for --enable-dctransform... yes
checking for --enable-webviewwebkit... yes
checking for --enable-palette... yes
checking for --enable-image... yes
checking for --enable-gif... yes
checking for --enable-pcx... yes
checking for --enable-tga... yes
checking for --enable-iff... yes
checking for --enable-pnm... yes
checking for --enable-xpm... yes
checking for --enable-ico_cur... yes
checking for --enable-dccache... yes
checking for --enable-ps-in-msw... yes
checking for --enable-ownerdrawn... yes
checking for --enable-uxtheme... yes
checking for --enable-wxdib... yes
checking for --enable-webviewie... yes
checking for --enable-autoidman... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether we are using the Intel C compiler... no
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking whether gcc needs -traditional... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether we are using the Intel C++ compiler... no
checking for ar... ar
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for langinfo.h... no
checking for wchar.h... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking size of short... 2
checking size of void *... 8
checking size of int... 4
checking size of long... 4
checking size of size_t... 8
checking size of long long... 8
checking size of wchar_t... 2
checking for va_copy... yes
checking whether the compiler supports variadic macros... yes
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking if large file support is available... yes
checking for _LARGEFILE_SOURCE value needed for large files... no
checking whether byte ordering is bigendian... no
checking for iostream... yes
checking if C++ compiler supports the explicit keyword... yes
checking for std::wstring in <string>... yes
checking for std::istream... yes
checking for std::ostream... yes
checking how to run the C++ preprocessor... g++ -E
checking type_traits usability... yes
checking type_traits presence... yes
checking for type_traits... yes
checking for __sync_fetch_and_add and __sync_sub_and_fetch builtins... yes
checking for libraries directories... /usr/lib
checking for cos... yes
checking for floor... yes
checking if floating point functions link without -lm... yes
checking for strtoull... yes
checking for pkg-config... no
configure: WARNING: Defaulting to the builtin regex library for Unicode build.
checking for zlib.h >= 1.1.4... yes
checking for zlib.h... (cached) yes
checking for deflate in -lz... yes
checking for png.h > 0.90... yes
checking for png.h... (cached) yes
checking for png_sig_cmp in -lpng... yes
checking for jpeglib.h... yes
checking for jpeg_read_header in -ljpeg... yes
checking for boolean... yes
checking size of boolean... 1
checking for tiffio.h... yes
checking for TIFFError in -ltiff... yes
checking for expat.h... yes
checking if expat.h is valid C++ header... yes
checking for XML_ParserCreate in -lexpat... yes
checking for w32api.h... yes
checking for windows.h... yes
checking for ddraw.h... yes
checking for mode_t... yes
checking for off_t... yes
checking for pid_t... yes
checking for size_t... yes
checking for ssize_t... yes
checking if size_t is unsigned int... no
checking if size_t is unsigned long... no
checking if wchar_t is separate type... yes
checking for pw_gecos in struct passwd... no
checking for wcslen... yes
checking for wcsftime... yes
checking for strnlen... yes
checking for wcsdup... yes
checking for wcsnlen... yes
checking for wcscasecmp... no
checking for wcsncasecmp... no
checking for mbstate_t... yes
checking for wcsrtombs... yes
checking for snprintf... yes
checking for vsnprintf... yes
checking for vsscanf... yes
checking for vsnprintf declaration... yes
checking if vsnprintf declaration is broken... no
checking for snprintf declaration... yes
checking if snprintf supports positional arguments... yes
checking for vsscanf declaration... yes
checking if vsscanf() declaration is broken... no
checking for putws... no
checking for fputws... yes
checking for wprintf... yes
checking for vswprintf... yes
checking for vswscanf... yes
checking for _vsnwprintf... yes
checking for fsync... no
checking for round... yes
checking for localtime_r... no
checking for gmtime_r... no
checking how many arguments gethostbyname_r() takes... can't tell
checking for gethostbyname... yes
checking how many arguments getservbyname_r() takes... no
checking for getservbyname... yes
configure: WARNING: wxFileSystemWatcher disabled due to --disable-threads
configure: WARNING: wxFileSystemWatcher won't be available on this platform
configure: WARNING: Catching fatal exceptions not currently supported on this system, wxApp::OnFatalException will not be called
checking for complete xlocale... no
checking for gettimeofday... yes
checking whether gettimeofday takes two arguments... yes
checking for timezone variable in <time.h>... timezone
checking for localtime... yes
checking for tm_gmtoff in struct tm... no
checking for setpriority... no
checking for python... no
checking if GDI+ is available... yes
checking CXXWARNINGS for gcc -Woverloaded-virtual... -Woverloaded-virtual
checking for gcc precompiled header bug... no
checking for a BSD-compatible install... /usr/bin/install -c
checking for ranlib... ranlib
checking whether ln -s works... no, using cp -pR
checking whether make sets $(MAKE)... yes
checking for ar... (cached) ar
checking for strip... strip
checking for nm... nm
checking if make is GNU make... yes
checking for dependency tracking method... gcc
checking for windres... windres
checking if the compiler supports precompiled headers... yes
checking whether make sets $(MAKE)... (cached) yes
checking for cppunit-config... no
checking for Cppunit - version >= 1.8.0... no
checking for CPPUNIT... configure: WARNING: cppunit not found
configure: creating ./config.status
config.status: creating lib/wx/config/msw-unicode-static-3.0
config.status: creating lib/wx/config/inplace-msw-unicode-static-3.0
config.status: creating utils/ifacecheck/rungccxml.sh
config.status: creating Makefile
config.status: creating samples/wrapsizer/Makefile
config.status: creating samples/wizard/Makefile
config.status: creating samples/widgets/Makefile
config.status: creating samples/webview/Makefile
config.status: creating samples/vscroll/Makefile
config.status: creating samples/validate/Makefile
config.status: creating samples/uiaction/Makefile
config.status: creating samples/typetest/Makefile
config.status: creating samples/treelist/Makefile
config.status: creating samples/treectrl/Makefile
config.status: creating samples/toolbar/Makefile
config.status: creating samples/text/Makefile
config.status: creating samples/taskbar/Makefile
config.status: creating samples/taborder/Makefile
config.status: creating samples/svg/Makefile
config.status: creating samples/stc/Makefile
config.status: creating samples/statbar/Makefile
config.status: creating samples/splitter/Makefile
config.status: creating samples/splash/Makefile
config.status: creating samples/sound/Makefile
config.status: creating samples/sockets/Makefile
config.status: creating samples/shaped/Makefile
config.status: creating samples/scroll/Makefile
config.status: creating samples/sashtest/Makefile
config.status: creating samples/richtext/Makefile
config.status: creating samples/ribbon/Makefile
config.status: creating samples/render/Makefile
config.status: creating samples/regtest/Makefile
config.status: creating samples/propgrid/Makefile
config.status: creating samples/printing/Makefile
config.status: creating samples/popup/Makefile
config.status: creating samples/ownerdrw/Makefile
config.status: creating samples/opengl/penguin/Makefile
config.status: creating samples/opengl/isosurf/Makefile
config.status: creating samples/opengl/cube/Makefile
config.status: creating samples/opengl/Makefile
config.status: creating samples/oleauto/Makefile
config.status: creating samples/notebook/Makefile
config.status: creating samples/nativdlg/Makefile
config.status: creating samples/minimal/Makefile
config.status: creating samples/menu/Makefile
config.status: creating samples/mediaplayer/Makefile
config.status: creating samples/mdi/Makefile
config.status: creating samples/listctrl/Makefile
config.status: creating samples/layout/Makefile
config.status: creating samples/keyboard/Makefile
config.status: creating samples/joytest/Makefile
config.status: creating samples/ipc/Makefile
config.status: creating samples/internat/Makefile
config.status: creating samples/image/Makefile
config.status: creating samples/html/zip/Makefile
config.status: creating samples/html/widget/Makefile
config.status: creating samples/html/virtual/Makefile
config.status: creating samples/html/test/Makefile
config.status: creating samples/html/printing/Makefile
config.status: creating samples/html/helpview/Makefile
config.status: creating samples/html/help/Makefile
config.status: creating samples/html/about/Makefile
config.status: creating samples/html/Makefile
config.status: creating samples/htlbox/Makefile
config.status: creating samples/help/Makefile
config.status: creating samples/grid/Makefile
config.status: creating samples/font/Makefile
config.status: creating samples/exec/Makefile
config.status: creating samples/except/Makefile
config.status: creating samples/event/Makefile
config.status: creating samples/erase/Makefile
config.status: creating samples/drawing/Makefile
config.status: creating samples/dragimag/Makefile
config.status: creating samples/docview/Makefile
config.status: creating samples/dnd/Makefile
config.status: creating samples/dll/Makefile
config.status: creating samples/display/Makefile
config.status: creating samples/dialup/Makefile
config.status: creating samples/dialogs/Makefile
config.status: creating samples/dataview/Makefile
config.status: creating samples/controls/Makefile
config.status: creating samples/config/Makefile
config.status: creating samples/combo/Makefile
config.status: creating samples/collpane/Makefile
config.status: creating samples/clipboard/Makefile
config.status: creating samples/caret/Makefile
config.status: creating samples/calendar/Makefile
config.status: creating samples/aui/Makefile
config.status: creating samples/artprov/Makefile
config.status: creating samples/animate/Makefile
config.status: creating samples/Makefile
config.status: creating demos/bombs/Makefile
config.status: creating demos/forty/Makefile
config.status: creating demos/fractal/Makefile
config.status: creating demos/life/Makefile
config.status: creating demos/Makefile
config.status: creating demos/poem/Makefile
config.status: creating utils/emulator/Makefile
config.status: creating utils/emulator/src/Makefile
config.status: creating utils/execmon/Makefile
config.status: creating utils/helpview/Makefile
config.status: creating utils/helpview/src/Makefile
config.status: creating utils/hhp2cached/Makefile
config.status: creating utils/ifacecheck/src/Makefile
config.status: creating utils/Makefile
config.status: creating utils/screenshotgen/Makefile
config.status: creating utils/screenshotgen/src/Makefile
config.status: creating utils/wxrc/Makefile
config.status: creating lib/wx/include/msw-unicode-static-3.0/wx/setup.h
config.status: executing rcdefs.h commands
config.status: executing wx-config commands

Configured wxWidgets 3.0.5 for `x86_64-w64-mingw32'

  Which GUI toolkit should wxWidgets use?                 msw
  Should wxWidgets be compiled into single library?       yes
  Should wxWidgets be linked as a shared library?         no
  Should wxWidgets support Unicode?                       yes (using wchar_t)
  What level of wxWidgets compatibility should be enabled?
                                       wxWidgets 2.6      no
                                       wxWidgets 2.8      yes
  Which libraries should wxWidgets use?
                                       STL                no
                                       jpeg               sys
                                       png                sys
                                       regex              builtin
                                       tiff               sys
                                       zlib               sys
                                       expat              sys
                                       libmspack          no
                                       sdl                no
After make; make install; and my own makefile for my app, it worked... except it requires jpg and png dlls. If I copy them in the same folder as my executable, then it tells an error: 0xc000007b at the start. This is something I don't understand. It starts and ask for DLLs, if I supply them, it tells an error. FYI I copied the DLLs from C:\msys64\mingw64\bin

I used to compile in 32 bits with MinGw32 and I avoided DLLs with following options:

Code: Select all

../../configure --enable-monolithic --disable-shared --enable-unicode --disable-threads
where '--disable-threads' avoids having to add mingwm10.dll in app folder.
And in my Makefile:

Code: Select all

LFLAGS = -lm  -static-libgcc -static-libstdc++ -lmingw32 `wx-config --libs`
My goal now is to be able to do the equivalent in 64 bits using MinGW64... I was not able to find a tutorial to help me in my purpose. Hence, I have tried "blindly".
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4204
Joined: Sun Jan 03, 2010 5:45 pm

Re: "wx.rc" not found on MSYS2/W64 on Win10

Post by PB »

It does not seem that you asked for the builtin versions of the library. I think that e.g. for libjpeg that would be

Code: Select all

--with-libjpeg=builtin
see viewtopic.php?p=120079#p120079

BTW, here is my guide to building wxWidgets on MSW with GCC with MSYS mingw-w64 package, but it uses MinGW makefiles and adding the libraries in the IDE manually (well, using the Code::Blocks wizard), not MSYS environment and configure:
viewtopic.php?f=19&t=47231
francis33y
Experienced Solver
Experienced Solver
Posts: 70
Joined: Wed Feb 13, 2008 9:21 am
Location: Montpellier, France

Re: "wx.rc" not found on MSYS2/W64 on Win10

Post by francis33y »

I have compiled wx3.1.4 with following configure

Code: Select all

../../configure --enable-monolithic --disable-shared  --enable-unicode --disable-sys-libs --without-subdirs --disable-xrc
And after make; make install; and my own make of my software (as stated earlier)... it gives an executable that works fine from within MSYS2 command line and, when launched directly from Win10, requires no extra DLL (as least does not complain about missing DLL) but stops with same error as above
App could not start correctly (0xc000007b), click ok to close app
I remember that, a long time ago, I had the same problem in 32 bits and had to add mingw10.dll and add some static libs in my makefile (gcc and stdc++).

I truly don't know what I am doing wrong ... probably which DLL (or static lib in my makefile) is missing... any help ?

If no help, I'll drop MSYS2 and start new strategy using DOS command line (which is completely new to me).
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4204
Joined: Sun Jan 03, 2010 5:45 pm

Re: "wx.rc" not found on MSYS2/W64 on Win10

Post by PB »

I do not know what that error is. Do you have the MinGW bin folder in your PATH? Does the minimal sample produced the same error? If not, it may be the customizations you are doing in your makefile.
francis33y wrote: Wed Oct 07, 2020 6:55 am If no help, I'll drop MSYS2 and start new strategy using DOS command line (which is completely new to me).
You may consider using CMakeGUI which has both powerful possibilities of build customization and ease of doing them with a GUI.

However, using MinGW makefile is easy as well, except that some customizations cannot be made by passing a command line parameter but must be done by modifying setup.h
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7477
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: "wx.rc" not found on MSYS2/W64 on Win10

Post by ONEEYEMAN »

Hi,
What is the reason you want MONOLITHIC build?
It doesn't gin anything and might give your problems linking your code.

I suggest removing it and rebuilding the library.

Thank you.
francis33y
Experienced Solver
Experienced Solver
Posts: 70
Joined: Wed Feb 13, 2008 9:21 am
Location: Montpellier, France

Re: "wx.rc" not found on MSYS2/W64 on Win10

Post by francis33y »

I compiled again wx314 with MSYS2/W64 which went fine (no error)

Code: Select all

../../configure --enable-monolithic --disable-shared  --enable-unicode --with-libjpeg=builtin --with-libpng=builtin
I also did the "make samples", it stopped with errors:

Code: Select all

g++ -o stctest.exe stctest_sample_rc.o stctest_stctest.o stctest_edit.o stctest_prefs.o     -LC:/Users/XCY/Desktop/wx314/build/msw/lib -mwindows      -limm32     -lwxscintilla-3.1 -lwx_mswu-3.1 -lwxscintilla-3.1  -lwxjpeg-3.1 -lwxpng-3.1    -lwxregexu-3.1  -lz -lrpcrt4 -loleaut32 -lole32 -luuid -llzma -luxtheme -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lcomdlg32 -ladvapi32 -lversion -lwsock32 -lgdi32 -loleacc  -lexpat -ltiff -llzma -lz -lrpcrt4 -loleaut32 -lole32 -luuid -llzma -luxtheme -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lcomdlg32 -ladvapi32 -lversion -lwsock32 -lgdi32 -loleacc
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/XCY/Desktop/wx314/build/msw/lib/libwx_mswu-3.1.a(monolib_ScintillaWX.o):ScintillaWX.cpp:(.text+0x35fe): undefined reference to `ImmGetContext'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/XCY/Desktop/wx314/build/msw/lib/libwx_mswu-3.1.a(monolib_ScintillaWX.o):ScintillaWX.cpp:(.text+0x363f): undefined reference to `ImmSetCompositionWindow'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/XCY/Desktop/wx314/build/msw/lib/libwx_mswu-3.1.a(monolib_ScintillaWX.o):ScintillaWX.cpp:(.text+0x3743): undefined reference to `ImmSetCompositionFontW'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/XCY/Desktop/wx314/build/msw/lib/libwx_mswu-3.1.a(monolib_ScintillaWX.o):ScintillaWX.cpp:(.text+0x375b): undefined reference to `ImmReleaseContext'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/XCY/Desktop/wx314/build/msw/lib/libwx_mswu-3.1.a(monolib_ScintillaWX.o):ScintillaWX.cpp:(.text+0x3791): undefined reference to `ImmReleaseContext'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [Makefile:161 : stctest.exe] Erreur 1
make[2] : on quitte le répertoire « /c/Users/XCY/Desktop/wx314/build/msw/samples/stc »
make[1]: *** [Makefile:15 : stc] Erreur 2
make[1] : on quitte le répertoire « /c/Users/XCY/Desktop/wx314/build/msw/samples »
make: *** [Makefile:14701 : samples] Erreur 2
I then tested the minimal sample (which succeeded to be compiled) and got exactly the same problems as with my own app: requiring libgcc and zlib as DLLs. After providing these (taken in
C:\msys64\mingw64\bin
), I get exactly the same error as with my own app. Again, if launched from MSYS2 terminal, it just works nicely... while not at all from Win10 desktop.

I don't know why I can't use this method that just works fine for 32 bits. I guess I now need to follow PB's advice
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7477
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: "wx.rc" not found on MSYS2/W64 on Win10

Post by ONEEYEMAN »

Hi,
Could you please try without "--enable-monolithic"?
Or just use "--disable-monolithic".

Thank you.
Post Reply