Code::Blocks Forums

User forums => Help => Topic started by: nightrobin on June 24, 2014, 01:32:03 pm

Title: SOLVED-Help in CodeBlocks 13.12 and Irrlicht 1.8.1 Setup
Post by: nightrobin on June 24, 2014, 01:32:03 pm
Good day,
I just want to ask for help in setting up my Codeblocks 13.12 (with CodeBlocks' own MinGW) with Irrlicht 1.8.1, I can't seem to find any useful information/tutorial about it.
And the default Irrlicht Project in Codeblocks seems outdated and not running.
Also I want to know how to set this up manually and step by step.

I have windows 7.

Thanks in advance  :D
Title: Re: Help in CodeBlocks 13.12 and Irrlicht 1.8.1 Setup
Post by: stahta01 on June 24, 2014, 06:08:56 pm
Read this CB FAQ http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_I_would_like_to_compile_a_project_using_some_non-standard_libraries._How_can_I_indicate_to_CodeBlocks_that_these_libraries_and_include_files_exist.3F (http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_I_would_like_to_compile_a_project_using_some_non-standard_libraries._How_can_I_indicate_to_CodeBlocks_that_these_libraries_and_include_files_exist.3F)

The "For your project" section is the right choice to use; the "For global environment" is normally the wrong choice to use.

I am downloading irrlicht-1.8.1 right now to verify the CB Wizard does NOT work.

I suggest posting the type of error next time you have an error; it would also be good to have the actual error.
Not doing that implies you are a newbie this implies user error is the most likely type of error.

Tim S.
Title: Re: Help in CodeBlocks 13.12 and Irrlicht 1.8.1 Setup
Post by: stahta01 on June 24, 2014, 06:14:57 pm
From http://irrlicht.sourceforge.net/forum/viewtopic.php?f=1&t=48951 (http://irrlicht.sourceforge.net/forum/viewtopic.php?f=1&t=48951)

Quote
Ok, I just walked another person through this who had the same trouble. Basically he was using the Mingw coming with C::B (while I build the dll with the official MinGW which doesn't seem to be compatible in this case). And the trick was in the end rebuilding Irrlicht.dll and using that. But he also had a few troubles at first - which mainly where caused because he first didn't notice that the dll was not yet rebuild.

The above was my guess of the likeliest NON user error issue.

I am still going to confirm that as the cause.

Tim S.
 
Title: Re: Help in CodeBlocks 13.12 and Irrlicht 1.8.1 Setup
Post by: stahta01 on June 24, 2014, 06:26:14 pm
Seems to be at least be a minor CB Wizard script issue because I got a warning of something like "Please select a valid location".

After that I got a build error that might be caused by template code being out of date or unknown reason.

After I replaced the default code with the 01.HelloWorld example I got a error based on the Library being built by a different version of MinGW GCC.

Edit: Google error of "the procedure entry point __gxx_personality_v0 could not be located in the dynamic link library libstdc++6" got this link.

http://stackoverflow.com/questions/18668003/the-procedure-entry-point-gxx-personality-v0-could-not-be-located-in-the-dnyam (http://stackoverflow.com/questions/18668003/the-procedure-entry-point-gxx-personality-v0-could-not-be-located-in-the-dnyam)

Edit2: The suggestion of stackoverflow.com above failed to fix issue; likely still MinGW Version conflict caused error.

Tim S.
Title: Re: Help in CodeBlocks 13.12 and Irrlicht 1.8.1 Setup
Post by: stahta01 on June 24, 2014, 08:14:26 pm
Steps to Build Irrlicht HelloWorld under Windows 7 32-bit using default MinGW GCC

Step 1: Irrlicht's CB Library Project
   Step 1A: Open CB Project Irrlicht-gcc.cbp in /source/Irrlicht
   Step 1B: Select target "Win32 - Debug - dll"
   Step 1C: Build CB Project
   Note: Step 1B took a very long time as in about an hour for me on my slow computer; when I built all the targets.

Step 2: Test Library using Irrlicht's CB HelloWorld Project
   Step 2A: Open CB Project HelloWorld.cbp in examples/01.HelloWorld
   Step 2B: Build CB Project HelloWorld.cbp

Tim S.
Title: Re: Help in CodeBlocks 13.12 and Irrlicht 1.8.1 Setup
Post by: stahta01 on June 24, 2014, 09:12:44 pm
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/ (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

Tim S.
Title: Re: Help in CodeBlocks 13.12 and Irrlicht 1.8.1 Setup
Post by: 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?
Title: Re: Help in CodeBlocks 13.12 and Irrlicht 1.8.1 Setup
Post by: stahta01 on June 25, 2014, 02:02:59 am
Why on earth this is needed?
As far as I can see the only difference is s32 vs u32, am I correct?

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

Tim S.
Title: Re: Help in CodeBlocks 13.12 and Irrlicht 1.8.1 Setup
Post by: stahta01 on June 25, 2014, 02:04:31 am
Why on earth this is needed?
As far as I can see the only difference is s32 vs u32, am I correct?

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

Tim S.


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);

Tim S.
Title: Re: Help in CodeBlocks 13.12 and Irrlicht 1.8.1 Setup
Post by: MortenMacFly on June 25, 2014, 06:53:15 am
Correct, the build errors out without the change. I can redo the testing to find the error.
Usually for the wizards we just pick the easiest "Hello world" application provided with the SDK / package. Does such work?
Title: Re: Help in CodeBlocks 13.12 and Irrlicht 1.8.1 Setup
Post by: nightrobin on June 25, 2014, 12:12:59 pm
Thanks for all the help you gave, it solved the problem after I compile it :)
Title: Re: Help in CodeBlocks 13.12 and Irrlicht 1.8.1 Setup
Post by: stahta01 on June 25, 2014, 03:26:02 pm
Correct, the build errors out without the change. I can redo the testing to find the error.
Usually for the wizards we just pick the easiest "Hello world" application provided with the SDK / package. Does such work?

Yes, it does work if you replace all the code with the "Hello world" application provided with the SDK.

It changes over half of the file because the comments are very different.

They use a macro/function to avoid the error because of sign issue and I was afraid the macro/function was a recent fix that might cause old versions of library to fail.

Tim S.