User forums > Help

SOLVED-Help in CodeBlocks 13.12 and Irrlicht 1.8.1 Setup

<< < (2/3) > >>

stahta01:
Patch to fix the CB Wizard code under Windows.
Edit: Created this ticket partly to test how to create tickets https://sourceforge.net/p/codeblocks/tickets/19/


--- Code: ---Index: src/plugins/scriptedwizard/resources/irrlicht/files/main.cpp
===================================================================
--- src/plugins/scriptedwizard/resources/irrlicht/files/main.cpp (revision 9827)
+++ src/plugins/scriptedwizard/resources/irrlicht/files/main.cpp (working copy)
@@ -66,9 +66,15 @@
        parameter here, and set it to 0.
     */
 
+#ifdef _WIN32
     IrrlichtDevice *device =
+        createDevice(EDT_SOFTWARE, dimension2d<u32>(640, 480), 16,
+            false, false, false, 0);
+#else
+    IrrlichtDevice *device =
         createDevice(EDT_SOFTWARE, dimension2d<s32>(640, 480), 16,
             false, false, false, 0);
+#endif
 
     /*
     Set the caption of the window to some nice text. Note that there is

--- End code ---

Tim S.

oBFusCATed:
Why on earth this is needed?
As far as I can see the only difference is s32 vs u32, am I correct?

stahta01:

--- Quote from: oBFusCATed on June 25, 2014, 01:46:45 am ---Why on earth this is needed?
As far as I can see the only difference is s32 vs u32, am I correct?

--- End quote ---

Correct, the build errors out without the change. I can redo the testing to find the error.

Tim S.

stahta01:

--- Quote from: stahta01 on June 25, 2014, 02:02:59 am ---
--- Quote from: oBFusCATed on June 25, 2014, 01:46:45 am ---Why on earth this is needed?
As far as I can see the only difference is s32 vs u32, am I correct?

--- End quote ---

Correct, the build errors out without the change. I can redo the testing to find the error.

Tim S.


--- End quote ---


--- Code: ---mingw32-g++.exe -Wall -g -Wmissing-include-dirs -Wfatal-errors -Wno-unused-local-typedefs -IE:\OpenSourceCode\Apps\IDEs\CodeBlocks\codeblocks_devpaks\third_party_libs\irrlicht-1.8.1\include -c E:\Test\irr\main.cpp -o obj\Debug\main.o
E:\Test\irr\main.cpp: In function 'int main(int, char**)':
E:\Test\irr\main.cpp:71:35: error: invalid initialization of reference of type 'const irr::core::dimension2d<unsigned int>&' from expression of type 'irr::core::dimension2d<int>'
             false, false, false, 0);

--- End code ---

Tim S.

MortenMacFly:

--- Quote from: stahta01 on June 25, 2014, 02:02:59 am ---Correct, the build errors out without the change. I can redo the testing to find the error.

--- End quote ---
Usually for the wizards we just pick the easiest "Hello world" application provided with the SDK / package. Does such work?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version