in reply to Compiling Games::Irrlicht on Windows
use ExtUtils::MakeMaker; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. WriteMakefile( 'NAME' => 'Games::Irrlicht', 'VERSION_FROM' => 'lib/Games/Irrlicht.pm', 'PREREQ_PM' => { Config::Simple => '4.55', }, ($] >= 5.005 ? (ABSTRACT_FROM => 'lib/Games/Irrlicht.pm', AUTHOR => 'Tels <http://bloodgate.com/>') : () +), 'LIBS' => [ '-lIrrlicht -lgdi32 -lglu32 -lopengl32' ], # -l +jpeg -lzlib 'OPTIMIZE' => '-O2', 'DEFINE' => ' -GX -TP ', # e.g., '-DHAVE_SOMETHING' );
update: After downloading irrlicht-0.6.zip (latest at the moment), and setting up your LIB/INCLUDE/PATH env variables correctly , you need to apply the following patch to Irrlicht.xs
On your next attempt to compile with MSVS6, you'll be faced with--- Irrlicht.xs.orig Fri Jul 2 04:11:37 2004 +++ Irrlicht.xs Fri Jul 2 04:11:48 2004 @@ -1,12 +1,17 @@ -#include "EXTERN.h" -#include "perl.h" -#include "XSUB.h" #include <stdlib.h> #include <irrlicht.h> #include <time.h> + +#include "EXTERN.h" +#include "perl.h" +#include "XSUB.h" + + +# ifndef WIN32 struct timespec my_time_spec; +# endif /* ****************************************************************** +****** */ /* our framerate monitor memory */ @@ -229,9 +234,13 @@ while (to_sleep > 2) { // printf ("to_sleep: %i\n", to_sleep); +# ifdef WIN32 + Sleep(to_sleep * 1000); +# else my_time_spec.tv_sec = 0; my_time_spec.tv_nsec = to_sleep * 1000; nanosleep( &my_time_spec, NULL); // struct timespec *rem); +# endif now = timer->getTime() - base_ticks; // printf ("now: %i\n", now); to_sleep = min_time - (now - last);
which is a bug in the microsoft compiler (http://support.microsoft.com/default.aspx?scid=kb;EN-US;240862) and this problem was corrected in Microsoft Visual C++ .NET, so that's what you need (may mean recompiling your perl).C:\Perl\.cpanplus\5.8.3\build\Games-Irrlicht-0.04>nmake Microsoft (R) Program Maintenance Utility Version 6.00.9782.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. cl -c -nologo -Gf -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSO +LE -DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DPE RL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_REA +DFIX -O2 -DVERSION=\"0.04\" -DXS_VERSION=\"0.04\ " "-IC:\Perl\lib\CORE" -GX -TP Irrlicht.c Command line warning D4025 : overriding '/O1' with '/O2' Irrlicht.c Irrlicht.xs(69) : error C2555: 'MyEventReceiver::OnEvent' : overriding + virtual function differs from 'irr::IEventReceiver: :OnEvent' only by return type or calling convention C:\dev\irrlicht-0.6\include\IEventReceiver.h(168) : see declar +ation of 'IEventReceiver' Irrlicht.xs(84) : error C2259: 'MyEventReceiver' : cannot instantiate +abstract class due to following members: Irrlicht.xs(66) : see declaration of 'MyEventReceiver' Irrlicht.xs(84) : warning C4259: 'bool __thiscall irr::IEventReceiver: +:OnEvent(struct irr::SEvent)' : pure virtual functio n was not defined C:\dev\irrlicht-0.6\include\IEventReceiver.h(172) : see declar +ation of 'OnEvent' Irrlicht.xs(84) : error C2259: 'MyEventReceiver' : cannot instantiate +abstract class due to following members: Irrlicht.xs(66) : see declaration of 'MyEventReceiver' Irrlicht.xs(84) : warning C4259: 'bool __thiscall irr::IEventReceiver: +:OnEvent(struct irr::SEvent)' : pure virtual functio n was not defined C:\dev\irrlicht-0.6\include\IEventReceiver.h(172) : see declar +ation of 'OnEvent' Irrlicht.xs(102) : warning C4800: 'unsigned int' : forcing value to bo +ol 'true' or 'false' (performance warning) Irrlicht.xs(395) : warning C4800: 'int' : forcing value to bool 'true' + or 'false' (performance warning) NMAKE : fatal error U1077: 'cl' : return code '0x2' Stop.
|
|---|