Trial to followup my stalled project using wxWidgets 2.8.12 and MinGW 4.7.* (Sticky) (Issue #23413)

155 views
Skip to first unread message

Lothar Behrens

unread,
Apr 1, 2023, 11:06:12 AM4/1/23
to wx-...@googlegroups.com, Subscribed

Hi

I try to start again with my project that uses wxWidgets. Before going into any porting stuff to the current release, I am trying to test
my source installer based build script that had worked and tested at the time I stopped development.

If I could go to the current version with out unicode support and a 'compatible' setting, I'll try that. But for now, I ask if the error is
known...

I stick to MinGW 4.7.* like the following:

@Rem Get an explicite version that always ensures to build the code
set MINGW_STICKON_VERSION=4.7.*
set MINGW_STICKON_WIN32_VERSION=4.0.3-*

I patch a header to represent my settings as have been tested:
copy /Y %DEVLW%\lbDMF\w32api-Wcpp-patch.h Develop\Tools\MinGW\include\w32api.h

/**

  • @file w32api.h
  • Copyright 2012, 2013 MinGW.org project
  • Permission is hereby granted, free of charge, to any person obtaining a
  • copy of this software and associated documentation files (the "Software"),
  • to deal in the Software without restriction, including without limitation
  • the rights to use, copy, modify, merge, publish, distribute, sublicense,
  • and/or sell copies of the Software, and to permit persons to whom the
  • Software is furnished to do so, subject to the following conditions:
  • The above copyright notice and this permission notice (including the next
  • paragraph) shall be included in all copies or substantial portions of the
  • Software.
  • THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  • IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  • FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  • AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  • LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  • FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  • DEALINGS IN THE SOFTWARE.
    */
    #ifndef _W32API_H
    #define _W32API_H
    #pragma GCC system_header
    //#warning WARNING - The w32api.h header file is deprecated and will be removed.

#define __W32API_VERSION 3.17
#define __W32API_MAJOR_VERSION 3
#define __W32API_MINOR_VERSION 17

/* The following defines are for documentation purposes. The following defines

  • identify the versions of Windows and Internet Explorer. They are not to be
  • used in the w32api library but may be used by a user to set the _WIN32_WINNT
  • or _WIN32_WINDOWS and the WINVER values to their minimum level of support.
  • Similarly the user can use the Internet Explorer values to set the _WIN32_IE
  • value to their minimum level of support.
    */

/* Use these values to set _WIN32_WINDOWS and WINVER to your minimum support

  • level */
    #define Windows95 0x0400
    #define Windows98 0x0410
    #define WindowsME 0x0500

/* Use these values to set _WIN32_WINNT and WINVER to your mimimum support

  • level. */
    #define WindowsNT4 0x0400
    #define Windows2000 0x0500
    #define WindowsXP 0x0501
    #define Windows2003 0x0502
    #define WindowsVista 0x0600

/* Use these values to set _WIN32_IE to your minimum support level */
#define IE3 0x0300
#define IE301 0x0300
#define IE302 0x0300
#define IE4 0x0400
#define IE401 0x0401
#define IE5 0x0500
#define IE5a 0x0500
#define IE5b 0x0500
#define IE501 0x0501
#define IE55 0x0501
#define IE56 0x0560
#define IE6 0x0600
#define IE601 0x0601
#define IE602 0x0603
#define IE7 0x0700

#endif /* ndef _W32API_H */

My batch based process copies the setup.h from msw like:
copy /Y %WXDIR%\include\wx\msw\setup.h %WXDIR%\include\wx

And it copies a prepared file:
copy /Y %DEVLW%\lbDMF\wxWidgets-config.gcc %WXDIR%\build\msw\config.gcc

Which has the following setings:

`# =========================================================================

This configuration file was generated by

Bakefile 0.2.9 (http://www.bakefile.org)

Beware that all changes made to this file will be overwritten next

time you run Bakefile!

=========================================================================

-------------------------------------------------------------------------

These are configurable options:

-------------------------------------------------------------------------

Compiler flags to link shared library

LINK_DLL_FLAGS ?= -shared

Compiler flags to link loadable module

LINK_MODULE_FLAGS ?= -shared

C compiler

CC = gcc

C++ compiler

CXX = g++

Standard flags for CC

CFLAGS ?=

Standard flags for C++

CXXFLAGS ?=

Standard preprocessor flags (common for CC and CXX)

CPPFLAGS ?=

Standard linker flags

LDFLAGS ?=

The C preprocessor

CPP ?= $(CC) -E

What type of library to build? [0,1]

SHARED ?= 1

Build wxUniversal instead of native port? [0,1]

WXUNIV ?= 0

Compile Unicode build of wxWidgets? [0,1]

UNICODE ?= 0

Use MSLU library when building Unicode version. [0,1]

MSLU ?= 0

Type of compiled binaries [debug,release]

BUILD ?= release

Should debugging info be included in the executables? The default value

"default" means that debug info will be included if BUILD=debug

and not included if BUILD=release. [0,1,default]

DEBUG_INFO ?= default

Should WXDEBUG be defined? The default value "default" means that it will

be defined if BUILD=debug and not defined if BUILD=release. [0,1,default]

DEBUG_FLAG ?= default

Multiple libraries or single huge monolithic one? [0,1]

MONOLITHIC ?= 0

Build GUI libraries? [0,1]

USE_GUI ?= 1

Build wxHTML library (USE_GUI must be 1)? [0,1]

USE_HTML ?= 1

Build multimedia library (USE_GUI must be 1)? [0,1]

USE_MEDIA ?= 1

Build wxXRC library (USE_GUI must be 1)? [0,1]

USE_XRC ?= 1

Build wxAUI library (USE_GUI must be 1)? [0,1]

USE_AUI ?= 1

Build wxRichTextCtrl library (USE_GUI must be 1)? [0,1]

USE_RICHTEXT ?= 1

Build OpenGL canvas library (USE_GUI must be 1)? [0,1]

USE_OPENGL ?= 0

Build ODBC database classes (USE_GUI must be 1)? [0,1]

USE_ODBC ?= 0

Build quality assurance classes library (USE_GUI must be 1)? [0,1]

USE_QA ?= 0

Enable exceptions in compiled code. [0,1]

USE_EXCEPTIONS ?= 1

Enable run-time type information (RTTI) in compiled code. [0,1]

USE_RTTI ?= 1

Enable threading in compiled code. [0,1]

USE_THREADS ?= 1

Enable wxCairoContext for platforms other than Linux/GTK. [0,1]

USE_CAIRO ?= 0

Link with gdiplus.lib? (Needed for wxGraphicsContext, will also set wxUSE_GRAPHICS_CONTEXT) [0,1]

USE_GDIPLUS ?= 0

Is this official build by wxWidgets developers? [0,1]

OFFICIAL_BUILD ?= 0

Use this to name your customized DLLs differently

VENDOR ?= custom

WX_FLAVOUR ?=

WX_LIB_FLAVOUR ?=

Name of your custom configuration. This affects directory

where object files are stored as well as the location of

compiled .lib files and setup.h under the lib/ toplevel directory.

CFG ?=

Compiler flags needed to compile test suite in tests directory. If you want

to run the tests, set it so that the compiler can find CppUnit headers.

CPPUNIT_CFLAGS ?=

Linker flags needed to link test suite in tests directory. If you want

to run the tests, include CppUnit library here.

CPPUNIT_LIBS ?=

Version of C runtime library to use. You can change this to

static if SHARED=0, but it is highly recommended to not do

it if SHARED=1 unless you know what you are doing. [dynamic,static]

RUNTIME_LIBS ?= dynamic

Set the version of your Mingw installation here.

"3" ...... this is for Mingw 2.0 or newer (comes with gcc3)

"2.95" ... for Mingw 1.1 or any of the older versions [3,2.95]

GCC_VERSION ?= 3
`

I get the following error, I cannot explain given my trial to stick to versions of a compiler and wxWidgets, proved to me working.

The following error happens (first two):

gcc -c -o gcc_mswdll\wxregex_regcomp.o -O2 -mthreads -DHAVE_W32API_H -I....\include -I....\lib\gcc_dll\msw -D__WXMSW__ -MTgcc_mswdll\wxregex_regcomp.o -MFgcc_mswdll\wxregex_regcomp.o.d -MD -MP ../../src/regex/regcomp.c
In file included from ../../src/regex/regcustom.h:32:0,
from ../../src/regex/regguts.h:38,
from ../../src/regex/regcomp.c:33:
c:\lbdmf\develop\tools\mingw\bin../lib/gcc/mingw32/4.7.2/../../../../include/stdio.h:260:34: error: expected ',' or ';' before 'FILE'
In file included from ../../src/regex/regcustom.h:32:0,
from ../../src/regex/regguts.h:38,
from ../../src/regex/regcomp.c:33:
c:\lbdmf\develop\tools\mingw\bin../lib/gcc/mingw32/4.7.2/../../../../include/stdio.h:1048:1: error: unknown type name '_END_C_DECLS'

Any ideas, where this could come from?
I even test this on a fresh Windows 10 installation (VM)

Thanks,

Lothar


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23413@github.com>

VZ

unread,
Apr 1, 2023, 1:03:37 PM4/1/23
to wx-...@googlegroups.com, Subscribed

I'm sorry but I'm completely lost here. This reads like a continuation of a previous discussion, except that I'm not aware of any prior discussion of this. What is this w32api-Wcpp-patch.h and where does it come from?

Anyhow, if you're you building wx 2.8.12 using gcc 4.7, I'm afraid you're mostly on your own, as this 12 year old version is not supported since a very, very long time. FWIW I'd still expect it to work and it should definitely work in the same environment where you used it originally, but that's all I can say.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23413/1493046774@github.com>

Lothar Behrens

unread,
Apr 1, 2023, 1:40:13 PM4/1/23
to wx-...@googlegroups.com, Subscribed

Sorry for the confusion. Even I can only assume that w32api-Wcpp-patch.h stems from a Watcom build and I wonder how that even worked with MinGW.

Meanwhile I found, that MinGW sticking to 4.7 and w32 API to 4.0 messed up the installation of MinGW while trying itself downgrading. I tried to stick to a reported as available 4.8 GCC and 5.0 w32 API without luck.

Now I downloaded the current wxMSW-3.2.2.1-Setup and have NOT used any of my patches. As my development was stopped since 2016.

With the last version of wxMSW and no sticky GCC (current as of install), I can compile the code (without touching any configuration) until some OLE errors:

g++ -c -o gcc_mswud\baselib_filename.o -I....\src\zlib -I....\3rdparty\pcre\src\wx -I....\src\expat\expat\lib -g -O0 -mthreads -D__WXMSW__ -D_UNICODE -I....\lib\gcc_lib\mswud -I....\include -W -Wall -DWXBUILDING -DwxUSE_GUI=0 -DwxUSE_BASE=1 -Wno-ctor-dtor-privacy -MTgcc_mswud\baselib_filename.o -MFgcc_mswud\baselib_filename.o.d -MD -MP ../../src/common/filename.cpp
In file included from ../../src/common/filename.cpp:106:0:
....\include/wx/msw/ole/oleutils.h: In function 'bool wxOleInitialize()':
....\include/wx/msw/ole/oleutils.h:49:16: error: 'RPC_E_CHANGED_MODE' was not declared in this scope
if ( hr != RPC_E_CHANGED_MODE && FAILED(hr) )
^~~~~~~~~~~~~~~~~~
....\include/wx/msw/ole/oleutils.h:49:47: error: 'FAILED' was not declared in this scope
if ( hr != RPC_E_CHANGED_MODE && FAILED(hr) )
^
....\include/wx/msw/ole/oleutils.h: At global scope:
....\include/wx/msw/ole/oleutils.h:146:42: error: 'S_OK' was not declared in this scope
wxVariantDataErrorCode(SCODE value = S_OK) { m_value = value; }

Any ideas there?


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23413/1493054763@github.com>

oneeyeman1

unread,
Apr 1, 2023, 1:53:52 PM4/1/23
to wx-...@googlegroups.com, Subscribed

@lollisoft ,

and no sticky GCC (current as of install),

What is this no sticky version?
Are you using MinGW or the one from MSYS?
What command you use to build wxWIdgets?

Thank you.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23413/1493057496@github.com>

VZ

unread,
Apr 1, 2023, 1:55:26 PM4/1/23
to wx-...@googlegroups.com, Subscribed

3.2.2 should work with gcc 4.8 and S_OK was definitely declared in all MinGW/w32 API versions. I suspect something bad has happened to your installation, but I have no idea what, sorry. I'd start by grepping for S_OK in your MinGW headers and then trying to understand why is the right header not being included. You may also want to use -H gcc option to see the headers being included.

But this is really not a wx problem at all.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23413/1493057759@github.com>

Lothar Behrens

unread,
Apr 1, 2023, 2:05:08 PM4/1/23
to wx-...@googlegroups.com, Subscribed

I am using a minimal set of bootstrap binaries in my source code installer. It installs this bootstrap binaries with a batch file to be executed, if the user flags this in the setup (default):

@Rem This batch will download and install MinGW by mingw-get

Develop\Tools\MinGW\bin\mingw-get install mingw
Develop\Tools\MinGW\bin\mingw-get install g++

Develop\Tools\MinGW\bin\mingw-get upgrade "gcc=%1"
Develop\Tools\MinGW\bin\mingw-get upgrade "g++=%1"

Develop\Tools\MinGW\bin\mingw-get upgrade "mingw32-w32api=%2"

@Rem Required to compile ACE
Develop\Tools\MinGW\bin\mingw-get install msys

I could try without that automatic MinGW install step and do only a manual install by a fresh download. As I am now getting the compile process starting, trying a manual MinGW install makes sense to sort out errors. Especially the downgrade and msys stuff, that is active, even not flagged for installation.

My idea was an installable 'build from scratch system' on a fresh installed Windows. This was working at least until MinGW removed the 4.7.* and other stuff (that now tells me, iaving some tools dependencies, that I have not preserved properly)


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23413/1493062759@github.com>

Lothar Behrens

unread,
Apr 1, 2023, 2:07:16 PM4/1/23
to wx-...@googlegroups.com, Subscribed

@oneeyeman1 and this was my sticky setting to be passed to the batch file:

set MINGW_STICKON_VERSION=4.7.*
set MINGW_STICKON_WIN32_VERSION=4.0.3-*


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23413/1493063519@github.com>

oneeyeman1

unread,
Apr 1, 2023, 2:10:24 PM4/1/23
to wx-...@googlegroups.com, Subscribed

@lollisoft ,
It WAS,, but according to your last post it's not anymore.
Hence the question - which one you are using NOW.

Thank you.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23413/1493064347@github.com>

Lothar Behrens

unread,
Apr 1, 2023, 2:31:27 PM4/1/23
to wx-...@googlegroups.com, Subscribed

@oneeyeman1
gcc --version
gcc (MinGW.org GCC-6.3.0-1) 6.3.0

I now have removed the downgrade part and the msys part as well. So a clean install using mingw-get install


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23413/1493067612@github.com>

Lothar Behrens

unread,
Apr 1, 2023, 2:32:37 PM4/1/23
to wx-...@googlegroups.com, Subscribed

Closed #23413 as completed.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issue/23413/issue_event/8904644873@github.com>

Lothar Behrens

unread,
Apr 1, 2023, 2:32:37 PM4/1/23
to wx-...@googlegroups.com, Subscribed

@vadz I know, that this is no wxWidgets issue after seeing that MinGW downgrade complained. I answered the last question of @oneeyeman1 only.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23413/1493069054@github.com>

VZ

unread,
Apr 1, 2023, 2:33:32 PM4/1/23
to wx-...@googlegroups.com, Subscribed

Sorry, but just to be clear: you need to find out why using S_OK after including <ole2.h>, as the wx code does, fail. This is definitely not normal and means that there is some problem with your MinGW installation. Unfortunately we can't help you further with this.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23413/1493068041@github.com>

Reply all
Reply to author
Forward
0 new messages