Build MyGui with Mingw TDM

Suryavarman

12-07-2012 15:46:21

My Mingw :
=== TDM-GCC Compiler Suite for Windows ===
--- GCC 4.5/4.6 Series ---
*** Standard MinGW 32-bit Edition ***


My CMake version : 2.8.8

First error :
Codeblocks log :
MyGUI_3.2.0\Common\Input\Win32\InputManager.cpp:184:92: error: '_countof' was not declared in this scope

My patche to solve :
Add on the top of InputManager.cpp

#ifdef MINGW32
#define _countof(x) ((sizeof(x)/sizeof(0[x])) / ((size_t)(!(sizeof(x) % sizeof(0[x])))))
#endif


http://stackoverflow.com/questions/4415 ... acro-for-c
http://gcc.gnu.org/bugzilla/attachment.cgi?id=20228

Second error:
Now i have that :
Codeblocks log :
Building CXX object Platforms/Ogre/OgrePlatform/CMakeFiles/MyGUI.OgrePlatform.dir/src/MyGUI_OgreVertexBuffer.cpp.obj
Linking CXX static library ..\..\..\lib\libMyGUI.OgrePlatform.a
[100%]
Built target MyGUI.OgrePlatform
mingw32-make.exe: *** No rule to make target `cmd'. Stop.
Process terminated with status 2 (2 minutes, 51 seconds)
0 errors, 0 warnings (2 minutes, 51 seconds)

Altren

12-07-2012 18:22:53

What about 1st issue, it was fixed not so long ago, but currently available only in sources from subversion.

What about that build error, to be honest, I have no clue where this comes from. 'cmd' word is not used in our CMake scripts, and also I found nothing useful in internet about what might cause such problem.

Suryavarman

13-07-2012 07:45:09

it's a makefile perhaps it's cmd = C:\Windows\system32\cmd.exe .
Perhaps a empty string with just cmd... i don't know me too.