Problem building Ogre 1.8 (boost related)

Problems building or running the engine, queries about how to use features etc.
Post Reply
Ertyui
Gnoblar
Posts: 15
Joined: Tue Jan 10, 2012 7:24 pm

Problem building Ogre 1.8 (boost related)

Post by Ertyui »

Hey all, I have a problem building Ogre 1.8.
After using Ogre 1.8RC I wanted to switch to the stable version.

At first I downloaded the standard prebuild sdk, but I got some errors with boost when I tried to compile my project that I'm working on. So I thought why not build it from source like I did with the RC version.
I got the source and compiled the dependencies.
I opened up cmake and opened the ogre source, I got some missing libraries and include directories, so I filled them in manually. (btw cg doesn't have a debug and release version of it's library right?)

The project was configured correctly (as far as I can tell) and then generated.
Everything fine so far.

Now when I open up the solution in Microsoft Visual C++ 2010 and start to build the sdk I get a lot of errors, all related to boost.
To my suprise these are the same errors as when I tried to compile my project with the prebuild sdk.
Below are some snippets of the errors:

Code: Select all

1>  OgrePrecompiledHeaders.cpp
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(104): error C2039: 'int_least8_t' : is not a member of '`global namespace''
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(104): error C2873: 'int_least8_t' : symbol cannot be used in a using-declaration
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(105): error C2039: 'int_fast8_t' : is not a member of '`global namespace''
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(105): error C2873: 'int_fast8_t' : symbol cannot be used in a using-declaration
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(107): error C2039: 'uint_least8_t' : is not a member of '`global namespace''
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(107): error C2873: 'uint_least8_t' : symbol cannot be used in a using-declaration
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(108): error C2039: 'uint_fast8_t' : is not a member of '`global namespace''
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(108): error C2873: 'uint_fast8_t' : symbol cannot be used in a using-declaration
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(111): error C2039: 'int_least16_t' : is not a member of '`global namespace''
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(111): error C2873: 'int_least16_t' : symbol cannot be used in a using-declaration
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(112): error C2039: 'int_fast16_t' : is not a member of '`global namespace''
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(112): error C2873: 'int_fast16_t' : symbol cannot be used in a using-declaration
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(114): error C2039: 'uint_least16_t' : is not a member of '`global namespace''
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(114): error C2873: 'uint_least16_t' : symbol cannot be used in a using-declaration
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(115): error C2039: 'uint_fast16_t' : is not a member of '`global namespace''
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(115): error C2873: 'uint_fast16_t' : symbol cannot be used in a using-declaration
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(118): error C2039: 'int_least32_t' : is not a member of '`global namespace''
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(118): error C2873: 'int_least32_t' : symbol cannot be used in a using-declaration
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(119): error C2039: 'int_fast32_t' : is not a member of '`global namespace''
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(119): error C2873: 'int_fast32_t' : symbol cannot be used in a using-declaration
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(121): error C2039: 'uint_least32_t' : is not a member of '`global namespace''
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(121): error C2873: 'uint_least32_t' : symbol cannot be used in a using-declaration
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(122): error C2039: 'uint_fast32_t' : is not a member of '`global namespace''
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(122): error C2873: 'uint_fast32_t' : symbol cannot be used in a using-declaration
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(127): error C2039: 'int_least64_t' : is not a member of '`global namespace''
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(127): error C2873: 'int_least64_t' : symbol cannot be used in a using-declaration
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(128): error C2039: 'int_fast64_t' : is not a member of '`global namespace''
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(128): error C2873: 'int_fast64_t' : symbol cannot be used in a using-declaration
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(130): error C2039: 'uint_least64_t' : is not a member of '`global namespace''
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(130): error C2873: 'uint_least64_t' : symbol cannot be used in a using-declaration
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(131): error C2039: 'uint_fast64_t' : is not a member of '`global namespace''
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(131): error C2873: 'uint_fast64_t' : symbol cannot be used in a using-declaration
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(135): error C2039: 'intmax_t' : is not a member of '`global namespace''
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(135): error C2873: 'intmax_t' : symbol cannot be used in a using-declaration
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(136): error C2039: 'uintmax_t' : is not a member of '`global namespace''
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(136): error C2873: 'uintmax_t' : symbol cannot be used in a using-declaration
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(38): error C2146: syntax error : missing ';' before identifier 'xtime_sec_t'
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(38): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(38): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(41): error C2146: syntax error : missing ';' before identifier 'xtime_nsec_t'
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(41): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(41): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(43): error C2146: syntax error : missing ';' before identifier 'sec'
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(43): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(43): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(44): error C2146: syntax error : missing ';' before identifier 'nsec'
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(44): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(44): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(49): error C2065: 'sec' : undeclared identifier
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(53): error C2065: 'nsec' : undeclared identifier
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(64): error C2039: 'sec' : is not a member of 'boost::xtime'
1>          C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(34) : see declaration of 'boost::xtime'
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(64): error C2039: 'xtime_sec_t' : is not a member of 'boost::xtime'
1>          C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(34) : see declaration of 'boost::xtime'
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(64): error C2061: syntax error : identifier 'xtime_sec_t'
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(65): error C2039: 'nsec' : is not a member of 'boost::xtime'
1>          C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(34) : see declaration of 'boost::xtime'
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(65): error C2039: 'xtime_nsec_t' : is not a member of 'boost::xtime'
1>          C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(34) : see declaration of 'boost::xtime'
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(65): error C2061: syntax error : identifier 'xtime_nsec_t'
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(82): error C2039: 'sec' : is not a member of 'boost::xtime'
1>          C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(34) : see declaration of 'boost::xtime'
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(82): error C2039: 'sec' : is not a member of 'boost::xtime'
1>          C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(34) : see declaration of 'boost::xtime'
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(83): error C2039: 'nsec' : is not a member of 'boost::xtime'
1>          C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(34) : see declaration of 'boost::xtime'
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(83): error C2039: 'nsec' : is not a member of 'boost::xtime'
1>          C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(34) : see declaration of 'boost::xtime'
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(85): error C2039: 'sec' : is not a member of 'boost::xtime'
1>          C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(34) : see declaration of 'boost::xtime'
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(85): error C2039: 'sec' : is not a member of 'boost::xtime'
1>          C:\DevLibs\Cpp\boost_1_49_0\boost/thread/xtime.hpp(34) : see declaration of 'boost::xtime'
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/win32/thread_data.hpp(75): error C2146: syntax error : missing ';' before identifier 'milliseconds'
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/win32/thread_data.hpp(75): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/win32/thread_data.hpp(75): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/win32/thread_data.hpp(81): error C2061: syntax error : identifier 'uintmax_t'
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/win32/thread_data.hpp(100): error C2061: syntax error : identifier 'uintmax_t'
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/win32/thread_data.hpp(83): error C2065: 'milliseconds_' : undeclared identifier
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/win32/thread_data.hpp(86): error C2614: 'boost::detail::timeout' : illegal member initialization: 'milliseconds' is not a base or member
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/win32/thread_data.hpp(93): error C2614: 'boost::detail::timeout' : illegal member initialization: 'milliseconds' is not a base or member
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/win32/thread_data.hpp(101): error C2065: 'remaining' : undeclared identifier
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/win32/thread_data.hpp(102): error C2065: 'remaining' : undeclared identifier
1>C:\DevLibs\Cpp\boost_1_49_0\boost/thread/win32/thread_data.hpp(103): fatal error C1903: unable to recover from previous error(s); stopping compilation
I've already searched around the internet and this forum and it only shows up with some iOS and Xcode related projects.
I've got the latest dependencies and the latest boost.

So what's going wrong?

Thanks in advance,

Greetz Ertyui
Ertyui
Gnoblar
Posts: 15
Joined: Tue Jan 10, 2012 7:24 pm

Re: Problem building Ogre 1.8 (boost related)

Post by Ertyui »

Luckily I can compile the project by using the rc sdk I've built and still use the newer dll's. So temporarely it's ok, but I'd still like to compile it with the stable version.
Thanks in advance :)
Transporter
Minaton
Posts: 933
Joined: Mon Mar 05, 2012 11:37 am
Location: Germany
x 110

Re: Problem building Ogre 1.8 (boost related)

Post by Transporter »

Ertyui wrote:btw cg doesn't have a debug and release version of it's library right?
That's correct!

Code: Select all

1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(104): error C2039: 'int_least8_t' : is not a member of '`global namespace''
1>C:\DevLibs\Cpp\boost_1_49_0\boost/cstdint.hpp(104): error C2873: 'int_least8_t' : symbol cannot be used in a using-declaration
Well it looks like a configuration error of boost. In line 57 of cstdint.hpp there is #include <stdint.h> which should include the required int types.

Btw, I build boost & ogre always from their repository source and it's working fine.
Ertyui
Gnoblar
Posts: 15
Joined: Tue Jan 10, 2012 7:24 pm

Re: Problem building Ogre 1.8 (boost related)

Post by Ertyui »

Yeah that's the strange part, I always build Ogre and Boost(libraries) from source and never had problems. But I don't know where to start on this one.
It happens with boost 1.48 and 1.49 as well. I don't think it's boost though.
It's also strange that it happens when I try to compile the project and when I try to build Ogre, I get the same error.
Thanks for the help so far :)
Transporter
Minaton
Posts: 933
Joined: Mon Mar 05, 2012 11:37 am
Location: Germany
x 110

Re: Problem building Ogre 1.8 (boost related)

Post by Transporter »

I had a few problems with a few revision in the beginning of boost 1.50 but my current version (signature) is working fine. Try to check the preprocessor definitions. Maybe the definition for win32 is removed so boost could't include stdint.h
Ertyui
Gnoblar
Posts: 15
Joined: Tue Jan 10, 2012 7:24 pm

Re: Problem building Ogre 1.8 (boost related)

Post by Ertyui »

Nope WIN32 is there..
As well as:
_WINDOWS
_DEBUG
DEBUG
BOOST_ALL_NO_LIB
OGRE_NONCLIENT_BUILD
FREEIMAGE_LIB
Ertyui
Gnoblar
Posts: 15
Joined: Tue Jan 10, 2012 7:24 pm

Re: Problem building Ogre 1.8 (boost related)

Post by Ertyui »

If It's not the preprocessors what else could it be?
Transporter
Minaton
Posts: 933
Joined: Mon Mar 05, 2012 11:37 am
Location: Germany
x 110

Re: Problem building Ogre 1.8 (boost related)

Post by Transporter »

It is a missing header. SDK is missing or preprocessor defines are blocking it. Check your solution file for SDK include paths.
psx
Gnoblar
Posts: 15
Joined: Thu May 14, 2009 10:35 am

Re: Problem building Ogre 1.8 (boost related)

Post by psx »

I have the same problem, but now with boost 1.50
I've tried everything told above.Nothing works.
Everything seems correct.
Preprocessor - correct.
Include files - all in place.
Paths - configured.

What it could be?
Maybe some new preprocessor definitions.

_C_STD_BEGIN
_C_STD_END

Maybe this.
Who solved that?
psx
Gnoblar
Posts: 15
Joined: Thu May 14, 2009 10:35 am

Re: Problem building Ogre 1.8 (boost related)

Post by psx »

SOLVED!!

Ok everyone.
In my case this happened because of conflict of two *.h files with the same names

Code: Select all

#include <stdint.h>
in boost cstdint.h
Here was the problem

First file with name stdint.h is located in MSVS directories. It should be included.
The second one exists in Ogre Dependencies zziplib folder.
So if you configure your project wrong - the names will collide, and viola - the compiler error
Post Reply