On a PC at work, I have finally been able to compile C::B with tdm 4.81 gcc
. On this PC I have not the problem of "mingw32-gcc.exe - No disk; There are no disk in the drive. Insert a disk in \Device\Harddisk4\DR4", that I met on my own PC, at home
!
I use also the last updated tdm version with winapi 3.17.
Nevertheless, I have made a small modification within wxWidgets 2.8.12, because compile time was too huge, due to apparently the back tracking of a warning: there were so many warnings that after 4 hours of messages
, I decided to stop compilation and tried to find a workaround. I had tons of messages like this one:
C:\wxWidgets-2.8.12\include/wx/debug.h:194:43: warning: typedef 'wxDummyCheckInt' locally defined but not used [-Wunused-local-typedefs]
#define wxFORCE_SEMICOLON typedef int wxDummyCheckInt
^
C:\wxWidgets-2.8.12\include/wx/debug.h:224:9: note: in expansion of macro 'wxFORCE_SEMICOLON'
wxFORCE_SEMICOLON /* just to force a semicolon */
^
C:\wxWidgets-2.8.12\include/wx/debug.h:233:38: note: in expansion of macro 'wxCHECK2_MSG'
#define wxCHECK_RET(cond, msg) wxCHECK2_MSG(cond, return, msg)
^
C:\wxWidgets-2.8.12\include/wx/buffer.h:289:9: note: in expansion of macro 'wxCHECK_RET'
wxCHECK_RET( m_bufdata->m_data, wxT("invalid wxMemoryBuffer") );
^
.....
in my C:\wxWidgets-2.8.12\include\wx folder, I have modified line 194 in debug.h:
original code:
#define wxFORCE_SEMICOLON typedef int wxDummyCheckInt
replaced by:
#define wxFORCE_SEMICOLON struct wxDummyCheckStruct /*typedef int wxDummyCheckInt*/
This is just a hack, because like that it's the same code for gnu and non-gnu gcc compilers, but it works.
Like that, I have been able to compile wxWidget 2.8.12 with gcc 4.8.1, with largely less warnings that without my hack (there are still a few ones!).
And build a new C::B version with gcc 4.81 too (in a few minutes, as usual).
I was not totally sure it will work because of the chicken and egg problem: who is the first?
Effectively, my old version of C::B was compiled with tdm 4.71, my new wxWidgets libraries and dll were compiled with gcc 4.81. But after some tries, it's OK.
Certainly, the order in which you build wxWidgets and intermediate C::B versions is important, because at certain step I had mixed things between 4.71 and 4.81 versions.
If this can help ...
gd_on
[attachment deleted by admin]