Skip to content

Commit 889f893

Browse files
committedNov 9, 2015
Abort compile when attempting to build client with Irrlicht 1.8.2
1 parent 88a3977 commit 889f893

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed
 

Diff for: ‎src/main.cpp

+13-6
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
1818
*/
1919

2020
#ifdef _MSC_VER
21-
#ifndef SERVER // Dedicated server isn't linked with Irrlicht
22-
#pragma comment(lib, "Irrlicht.lib")
23-
// This would get rid of the console window
24-
//#pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup")
25-
#endif
21+
#ifndef SERVER // Dedicated server isn't linked with Irrlicht
22+
#pragma comment(lib, "Irrlicht.lib")
23+
// This would get rid of the console window
24+
//#pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup")
25+
#endif
2626
#pragma comment(lib, "zlibwapi.lib")
2727
#pragma comment(lib, "Shell32.lib")
2828
#endif
@@ -59,7 +59,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
5959
#endif
6060

6161
#ifdef HAVE_TOUCHSCREENGUI
62-
#include "touchscreengui.h"
62+
#include "touchscreengui.h"
63+
#endif
64+
65+
#if !defined(SERVER) && \
66+
(IRRLICHT_VERSION_MAJOR == 1) && \
67+
(IRRLICHT_VERSION_MINOR == 8) && \
68+
(IRRLICHT_VERSION_REVISION == 2)
69+
#error "Irrlicht 1.8.2 is known to be broken - please update Irrlicht to version >= 1.8.3"
6370
#endif
6471

6572
#define DEBUGFILE "debug.txt"

4 commit comments

Comments
 (4)

sofar commented on Nov 9, 2015

@sofar
Contributor

+1 ;^)

HybridDog commented on Nov 10, 2015

@HybridDog
Contributor

please test the other way round (IRRLICHT_VERSION_REVISION == 2 first, …), l guess 1.8.* often appears but * .*.2 seldom appears.

est31 commented on Nov 13, 2015

@est31
Contributor

I'd consider that less readable. The way @kwolekr did it was completely okay.

est31 commented on Nov 13, 2015

@est31
Contributor

And don't overcomplicate version recognition #ifdefs, after all a broken ifdef version recognition is why 1.8.2 is a broken release.

Please sign in to comment.