Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Currently testing on TDM-GCC 32 bits because codeblocks default compiler can't build any 32bit program, even small projects like this: https://github.com/israpps/DiagBox
../../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
| ^~~~~~~~~~
makefile.gcc:9607: recipe for target 'gcc_mswud\monolib_mediactrl_am.o' failed
mingw32-make: *** [gcc_mswud\monolib_mediactrl_am.o] Error 1
mingw32-make: *** Waiting for unfinished jobs....
What wxWidgets version are you building?
Which GCC version are you using?
Is it an MinGW64 or an mingw.org based GCC compiler?
You do know that using Monolithic build is normally more likely to be broken, right?
stahta01 wrote: ↑Sun Jul 18, 2021 9:58 pm
What wxWidgets version are you building?
Which GCC version are you using?
Is it an MinGW64 or an mingw.org based GCC compiler?
You do know that using Monolithic build is normally more likely to be broken, right?
Tim S.
1) latest stable release
2) gcc versión 10.3.0 (tdm-1)
3) how do i check that?
4) i know, irrelevant however, since both of them fail on the same error
From 8a479f9dd82ba86a7122661fb10e5f3cf8ffa747 Mon Sep 17 00:00:00 2001
From: Maarten Bent <[email protected]>
Date: Thu, 16 Aug 2018 20:08:56 +0200
Subject: [PATCH] Fix c++11-narrowing error when using clang on Windows
Case value 0xfffffd9f results in the following error:
error: case value evaluates to 4294966687, which cannot be narrowed to type
'DISPID' (aka 'long') [-Wc++11-narrowing]
(cherry picked from commit fd81223a2f878757158b5266c362da71d43abee5)
---
src/msw/mediactrl_am.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/msw/mediactrl_am.cpp b/src/msw/mediactrl_am.cpp
index f5b9ed4a61..674da36e46 100644
--- a/src/msw/mediactrl_am.cpp
+++ b/src/msw/mediactrl_am.cpp
@@ -2179,7 +2179,9 @@ void wxAMMediaBackend::Move(int WXUNUSED(x), int WXUNUSED(y),
//---------------------------------------------------------------------------
void wxAMMediaEvtHandler::OnActiveX(wxActiveXEvent& event)
{
- switch(event.GetDispatchId())
+ // cast to unsigned long to fix narrowing error with case 0xfffffd9f
+ // when using clang
+ switch (static_cast<unsigned long>(event.GetDispatchId()))
{
#ifndef __WXWINCE__
case 0x00000001: // statechange in IActiveMovie
--
2.32.0.windows.2
From 8a479f9dd82ba86a7122661fb10e5f3cf8ffa747 Mon Sep 17 00:00:00 2001
From: Maarten Bent <[email protected]>
Date: Thu, 16 Aug 2018 20:08:56 +0200
Subject: [PATCH] Fix c++11-narrowing error when using clang on Windows
Case value 0xfffffd9f results in the following error:
error: case value evaluates to 4294966687, which cannot be narrowed to type
'DISPID' (aka 'long') [-Wc++11-narrowing]
(cherry picked from commit fd81223a2f878757158b5266c362da71d43abee5)
---
src/msw/mediactrl_am.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/msw/mediactrl_am.cpp b/src/msw/mediactrl_am.cpp
index f5b9ed4a61..674da36e46 100644
--- a/src/msw/mediactrl_am.cpp
+++ b/src/msw/mediactrl_am.cpp
@@ -2179,7 +2179,9 @@ void wxAMMediaBackend::Move(int WXUNUSED(x), int WXUNUSED(y),
//---------------------------------------------------------------------------
void wxAMMediaEvtHandler::OnActiveX(wxActiveXEvent& event)
{
- switch(event.GetDispatchId())
+ // cast to unsigned long to fix narrowing error with case 0xfffffd9f
+ // when using clang
+ switch (static_cast<unsigned long>(event.GetDispatchId()))
{
#ifndef __WXWINCE__
case 0x00000001: // statechange in IActiveMovie
--
2.32.0.windows.2
From 8a479f9dd82ba86a7122661fb10e5f3cf8ffa747 Mon Sep 17 00:00:00 2001
From: Maarten Bent <[email protected]>
Date: Thu, 16 Aug 2018 20:08:56 +0200
Subject: [PATCH] Fix c++11-narrowing error when using clang on Windows
Case value 0xfffffd9f results in the following error:
error: case value evaluates to 4294966687, which cannot be narrowed to type
'DISPID' (aka 'long') [-Wc++11-narrowing]
(cherry picked from commit fd81223a2f878757158b5266c362da71d43abee5)
---
src/msw/mediactrl_am.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/msw/mediactrl_am.cpp b/src/msw/mediactrl_am.cpp
index f5b9ed4a61..674da36e46 100644
--- a/src/msw/mediactrl_am.cpp
+++ b/src/msw/mediactrl_am.cpp
@@ -2179,7 +2179,9 @@ void wxAMMediaBackend::Move(int WXUNUSED(x), int WXUNUSED(y),
//---------------------------------------------------------------------------
void wxAMMediaEvtHandler::OnActiveX(wxActiveXEvent& event)
{
- switch(event.GetDispatchId())
+ // cast to unsigned long to fix narrowing error with case 0xfffffd9f
+ // when using clang
+ switch (static_cast<unsigned long>(event.GetDispatchId()))
{
#ifndef __WXWINCE__
case 0x00000001: // statechange in IActiveMovie
--
2.32.0.windows.2
Tim S.
wxWidgets-3.0.5
You might wish to try 3.0.5-1; but, I have no idea what was fixed in the dash 1; so, you need to apply the patch I have already posted.
for 3.0.5 .
El_isra wrote: ↑Sun Jul 18, 2021 10:08 pm
You do know that using Monolithic build is normally more likely to be broken, right?
Tim S.
4) i know, irrelevant however, since both of them fail on the same error
[/quote]
Changing from Monolithic to non Monolithic build requires the build folder to be deleted because cleaning is not enough to get rid of all the problems.
So, if you have changed Monolithic value, you need to delete the wxWidgets files and start with a new wxWidgets extraction folder.
the issue also happens on latest wxwidgets...
so i'm guessing it's compilers faul..
if any of you can recommend any toolchain capable of building 32bits wxwidgets programs i wil be very gratefull!