User forums > Using Code::Blocks

Trying to build this source code but no joy

<< < (2/3) > >>

stahta01:
wxWidgets 2.8.x is very old; the narrowing error I got is likely because the GCC 12.2.0 compiler I am using checks for more problems.
I guessed at a possible fix for it and re-started the build likely it will fail again; but, it might not.
Been a few years since I built wxWidgets 2.8.x (I think the x was 12; but, I  am not sure); I am building the git repo with changes I did about 5 years back. I am building using MSys2 MINGW32 GCC.

Tim S.

stahta01:
Two patches that I have applied today to my copy of wxWidgets 2.8 branch.


--- Code: ------ a/src/msw/utilsexc.cpp
+++ b/src/msw/utilsexc.cpp
@@ -879,7 +879,7 @@ long wxExecute(const wxString& cmd, int flags, wxProcess *handler)
                 wxFAIL_MSG( _T("unexpected WaitForInputIdle() return code") );
                 // fall through
 
-            case -1:
+            case WAIT_FAILED:
                 wxLogLastError(_T("WaitForInputIdle() in wxExecute"));
 
             case WAIT_TIMEOUT:
--

--- End code ---


--- Code: ------ a/src/msw/mediactrl_am.cpp
+++ b/src/msw/mediactrl_am.cpp
@@ -2179,7 +2179,7 @@ void wxAMMediaBackend::Move(int WXUNUSED(x), int WXUNUSED(y),
 //---------------------------------------------------------------------------
 void wxAMMediaEvtHandler::OnActiveX(wxActiveXEvent& event)
 {
-    switch(event.GetDispatchId())
+    switch(static_cast<unsigned long>(event.GetDispatchId()))
     {
 #ifndef __WXWINCE__
     case 0x00000001: // statechange in IActiveMovie
--

--- End code ---

The changes  are what I saw in wxWidgets master branch.

Tim S.

stahta01:
Based on the code changes I had to do to get the project to build I think the code was likely updated to build using wxWidgets 3.0.
I go it to build using wxWidgets 2.8.x Unicode (I cannot seem to get wxWidgets ANSI (non-Unicode) to build).

Edit: Add link to the git repo I did the changes in https://github.com/stahta01/Td5MapEditor/tree/cb_cleanup

Tim S.

Blenderpi:
Brilliant, I shall give it a look, Thank you for taking the time todo this Tim I greately appreciate this  :D

Edit: Just to confirm Tim in order to get it to build for me, Will I need to use the same settings as before, WxWidgets 2.8x and compiled using /makefile.gcc on CMD with the command
mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release clean

Then without the clean, Then same for the Debug build?

stahta01:

--- Quote from: Blenderpi on February 23, 2023, 10:53:17 am ---Brilliant, I shall give it a look, Thank you for taking the time todo this Tim I greately appreciate this  :D

Edit: Just to confirm Tim in order to get it to build for me, Will I need to use the same settings as before, WxWidgets 2.8x and compiled using /makefile.gcc on CMD with the command
mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release clean

Then without the clean, Then same for the Debug build?

--- End quote ---

That is not the correct setting for what you are trying to build!
From memory this should work; but, I did not use that.

--- Code: ---mingw32-make -f makefile.gcc MONOLITHIC=0 SHARED=0 UNICODE=1 BUILD=release

--- End code ---
I added these options; the "USE_ODBC=1" was added for this project; I do not think it was needed so you likely can build without it just remove the ODBC library from the CB Project; but, since I had no idea if the project needed it or not I built the wxWidgets to match the CB Project file.
The "USE_OPENGL=1" was added just because other people add it and it is not needed for your CB project.

--- Code: ---  CXXFLAGS=-std=gnu++11 CPPFLAGS=-D_WIN32_IE=0x0603 USE_OPENGL=1 USE_ODBC=1

--- End code ---
The other options I added because in the past building wxWidgets 2.8.x required them; it likely still does need them.

I would suggest using a new folder because cleaning does NOT work when you change the value of MONOLITHIC from past experience.

What I would use to build combined in one line

--- Code: ---mingw32-make -f makefile.gcc MONOLITHIC=0 SHARED=0 UNICODE=1 BUILD=release CXXFLAGS=-std=gnu++11 CPPFLAGS=-D_WIN32_IE=0x0603 USE_ODBC=1

--- End code ---

Tim S.




 

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version