I can't build Irrlicht 1.8.3 :(

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
zcorvid
Posts: 10
Joined: Fri Aug 07, 2015 10:59 am

I can't build Irrlicht 1.8.3 :(

Post by zcorvid »

Building of Irrlicht 1.8.3 in Code::Blocks with MinGW compiler, 5 errors:

Code: Select all

 
\irrlicht-1.8.3\source\Irrlicht\CFileSystem.cpp|515|error: '_MAX_PATH' was not declared in this scope|
\irrlicht-1.8.3\source\Irrlicht\CFileSystem.cpp|521|error: 'tmp' was not declared in this scope|
\irrlicht-1.8.3\source\Irrlicht\CFileSystem.cpp|614|error: '_MAX_PATH' was not declared in this scope|
\irrlicht-1.8.3\source\Irrlicht\CFileSystem.cpp|620|error: 'fpath' was not declared in this scope|
\irrlicht-1.8.3\source\Irrlicht\CFileSystem.cpp|620|error: '_fullpath' was not declared in this scope|
 
Irrlicht 1.8.3 was downloaded from the site: http://irrlicht.sourceforge.net/?page_id=10 some hours ago. Can any help me please ? :(

I'am afraid edit irrlicht sources, because it may be I'm trying build the engine in wrong way, and these errors are not errors in irrlicht codes...
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: I can't build Irrlicht 1.8.3 :(

Post by CuteAlien »

It sounds like you somehow got __STRICT_ANSI_ enabled in compiling.
Someone had that in the past (http://irrlicht.sourceforge.net/forum/v ... =4&t=49091), but I still don't understand why it would be enabled for some people. It's not enabled in the project file as far as I can see.

That's unless MinGW has changed the stdlib header (look for _MAX_PATH in MinGW/include/stdlib.h if there are any other conditions now).

edit: Also please tell us which Build target you did use.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
zcorvid
Posts: 10
Joined: Fri Aug 07, 2015 10:59 am

Re: I can't build Irrlicht 1.8.3 :(

Post by zcorvid »

I tryed 3 Build targets: All, Win32 - Debug - dll, Win32 - Release - accurate. At the screenshot it is first, second and third options:

Image
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: I can't build Irrlicht 1.8.3 :(

Post by CuteAlien »

OK, then it's definitely something new (meaning I can't reproduce it with my MinGW version).

edit: Unfortunately I can no longer upgrade MinGW easily - seems mingw-get upgrade just crashes. I'll have to re-install it some day.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
zcorvid
Posts: 10
Joined: Fri Aug 07, 2015 10:59 am

Re: I can't build Irrlicht 1.8.3 :(

Post by zcorvid »

There is an assumprion, why it is. Which c++ standart whould be using in irrlicht building ? I used c++11 (compiler flag: -std=c++11) and got that errors, now I disabled c++11 and building was correct o_O... Build Target - All.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: I can't build Irrlicht 1.8.3 :(

Post by CuteAlien »

Hm, yeah - that version has no c++11 support yet (Irrlicht 1.8.4 hopefully will have it). Thought I didn't know so far that _MAX_PATH is affected by that - very strange.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: I can't build Irrlicht 1.8.3 :(

Post by CuteAlien »

OK, found it. For whatever reason g++ on MinGW does define __STRICT_ANSI__ when you compile with -std=c++0x (my version had no -std=c++11 yet, but I suppose it's the same there). You can prevent that by compiling with -std=gnu++0x or by adding -U__STRICT_ANSI__ which will remove the __STRICT_ANSI__.

I'll try to figure out for next release if we can work around that **** somehow.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
zcorvid
Posts: 10
Joined: Fri Aug 07, 2015 10:59 am

Re: I can't build Irrlicht 1.8.3 :(

Post by zcorvid »

Thanks for help :)

I'm looking forward for 1.8.4 and hope that it will have c++11 support.
Post Reply