Author Topic: SOLVED-Help in CodeBlocks 13.12 and Irrlicht 1.8.1 Setup  (Read 11375 times)

Offline nightrobin

  • Single posting newcomer
  • *
  • Posts: 2
SOLVED-Help in CodeBlocks 13.12 and Irrlicht 1.8.1 Setup
« 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
« Last Edit: June 25, 2014, 12:14:20 pm by nightrobin »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Help in CodeBlocks 13.12 and Irrlicht 1.8.1 Setup
« Reply #1 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

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.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Help in CodeBlocks 13.12 and Irrlicht 1.8.1 Setup
« Reply #2 on: June 24, 2014, 06:14:57 pm »
From 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.
 
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Help in CodeBlocks 13.12 and Irrlicht 1.8.1 Setup
« Reply #3 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

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

Tim S.
« Last Edit: June 24, 2014, 06:45:45 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Help in CodeBlocks 13.12 and Irrlicht 1.8.1 Setup
« Reply #4 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.
« Last Edit: June 24, 2014, 08:25:26 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Help in CodeBlocks 13.12 and Irrlicht 1.8.1 Setup
« Reply #5 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/

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.
« Last Edit: June 24, 2014, 09:30:04 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Help in CodeBlocks 13.12 and Irrlicht 1.8.1 Setup
« Reply #6 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?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Help in CodeBlocks 13.12 and Irrlicht 1.8.1 Setup
« Reply #7 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.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Help in CodeBlocks 13.12 and Irrlicht 1.8.1 Setup
« Reply #8 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.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Help in CodeBlocks 13.12 and Irrlicht 1.8.1 Setup
« Reply #9 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?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline nightrobin

  • Single posting newcomer
  • *
  • Posts: 2
Re: Help in CodeBlocks 13.12 and Irrlicht 1.8.1 Setup
« Reply #10 on: June 25, 2014, 12:12:59 pm »
Thanks for all the help you gave, it solved the problem after I compile it :)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Help in CodeBlocks 13.12 and Irrlicht 1.8.1 Setup
« Reply #11 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.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org