Yake - Community Forum
September 10, 2010, 09:32:58 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: News #1: If you're registration is rejected please report via E-Mail (--> www.yake.org for details).
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: GCC/CodeBlocks include problems (ostream operator vector error)  (Read 1555 times)
JulyForToday
Newbie
*
Posts: 3


View Profile
« on: June 09, 2009, 10:55:34 AM »

Hey everyone, first time poster. I was finally able find my way around Yake and got 7.0 set up with codeblocks and most things would build well. However I decided to grab 8.0 (I couldn't get graphicsOgre to build without a release of ogremain).

Now I'm running into a problem with building Yake_Base:

Code:
..\..\yake\base\templates\yakeVector.h||In function `std::ostream& yake::operator<<(std::ostream&, const yake::Vector<_Value, _Alloc>&)':|
..\..\yake\base\templates\yakeVector.h|308|error: no match for 'operator<<' in 'out << "Vector"'|
..\..\yake\base\templates\yakeVector.h|310|error: no match for 'operator<<' in 'out << "["'|
..\..\yake\base\templates\yakeVector.h|311|error: no match for 'operator<<' in 'out << "("'|
..\..\yake\base\templates\yakeVector.h|318|error: no match for 'operator<<' in 'out << ", "'|
..\..\yake\base\templates\yakeVector.h|321|error: no match for 'operator<<' in 'out << ")"'|
||=== Build finished: 5 errors, 0 warnings ===|


I checked the code in yakevector.h, and it looks like a dead match for what was in 7.0, so I don't know what might have changed somewhere in it, or maybe somewhere else. Or maybe because I use C::B, but then 7.0 worked fine. I tried this with both the release out-of-the-box, and then updated from subversion and tried again (in case it was fixed) but no change. The compiler mentions ostream for some reason, so I'm not sure if that is related. I have no clue beyond that.  huh

Thanks.
« Last Edit: June 29, 2009, 12:29:31 AM by JulyForToday » Logged
Tomen
Yake Community Support
Jr. Member
*****
Posts: 94


View Profile WWW
« Reply #1 on: June 10, 2009, 05:35:32 PM »

Do you mean Yake 0.7 or VC7?
Logged
JulyForToday
Newbie
*
Posts: 3


View Profile
« Reply #2 on: June 10, 2009, 10:06:35 PM »

Sorry, didn't realize I wasn't being more clear. I meant Yake 0.7 and 0.8. I'm using Code::Blocks for an IDE.

I double checked everything, and 0.7 still compiles fine, and I can run the rafminimal test and the log shows everything working. I can't use any of the more advanced demos that require ogre because it wants the release version of the ogre dependencies, which aren't included in the 0.7 dependencies download.

I've played around a bit with the code in yake 0.8, and if I add an include for iostream.h in yake\base\templates\yakevector.h (or in yake\base\yakePrerequisites.h, which yakevector.h includes) it gives me an entirely different slew of errors that show up in four other files, policies.h, exception.h, dynamic_factory.h, and global_dynamic_factory.h. I'm guessing since yakevector is a template, and it's being screwed up, anything using that template is getting into trouble too. Here are the errors:

Code:
L:\Work\GameDev\_IDE\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\backward\backward_warning.h|32|warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.|
L:\Work\GameDev\_IDE\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\backward\backward_warning.h|32|warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.|
L:\Work\GameDev\_IDE\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\backward\backward_warning.h|32|warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.|
L:\Work\GameDev\_IDE\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\backward\backward_warning.h|32|warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.|
L:\Work\GameDev\_IDE\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\backward\backward_warning.h|32|warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.|
L:\Work\GameDev\_IDE\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\backward\backward_warning.h|32|warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.|
L:\Work\GameDev\_IDE\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\backward\backward_warning.h|32|warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.|
L:\Work\GameDev\_IDE\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\backward\backward_warning.h|32|warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.|
L:\Work\GameDev\_IDE\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\backward\backward_warning.h|32|warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.|
L:\Work\GameDev\_IDE\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\backward\backward_warning.h|32|warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.|
L:\Work\GameDev\_Engines\Yake\Yake8.0\src\base\native\win32\yakeApplication.cpp|34|warning: "WIN32_LEAN_AND_MEAN" redefined|
:5|1|warning: this is the location of the previous definition|
L:\Work\GameDev\_Engines\Yake\Yake8.0\src\base\native\win32\yakeConfig.cpp|32|warning: "WIN32_LEAN_AND_MEAN" redefined|
:5|1|warning: this is the location of the previous definition|
L:\Work\GameDev\_IDE\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\backward\backward_warning.h|32|warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.|
L:\Work\GameDev\_IDE\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\backward\backward_warning.h|32|warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.|
..\..\yake\base\native\win32\yakeConfig.h|35|warning: "WIN32_LEAN_AND_MEAN" redefined|
:5|1|warning: this is the location of the previous definition|
L:\Work\GameDev\_IDE\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\backward\backward_warning.h|32|warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.|
..\..\yake\base\native\win32\yakeConfig.h|35|warning: "WIN32_LEAN_AND_MEAN" redefined|
:5|1|warning: this is the location of the previous definition|
L:\Work\GameDev\_IDE\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\backward\backward_warning.h|32|warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.|
..\..\yake\base\native\win32\yakeConfig.h|35|warning: "WIN32_LEAN_AND_MEAN" redefined|
:5|1|warning: this is the location of the previous definition|
L:\Work\GameDev\_IDE\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\backward\backward_warning.h|32|warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.|
L:\Work\GameDev\_IDE\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\backward\backward_warning.h|32|warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.|
..\..\yake\base\native\win32\yakeConfig.h|35|warning: "WIN32_LEAN_AND_MEAN" redefined|
:5|1|warning: this is the location of the previous definition|
L:\Work\GameDev\_IDE\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\backward\backward_warning.h|32|warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.|
L:\Work\GameDev\_Engines\Yake\Yake8.0\src\base\native\win32\yakeTime.cpp|38|warning: "WIN32_LEAN_AND_MEAN" redefined|
:5|1|warning: this is the location of the previous definition|
L:\Work\GameDev\_IDE\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\backward\backward_warning.h|32|warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.|
L:\Work\GameDev\_IDE\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\backward\backward_warning.h|32|warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.|
L:\Work\GameDev\_IDE\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\backward\backward_warning.h|32|warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.|
L:\Work\GameDev\_IDE\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\backward\backward_warning.h|32|warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.|
L:\Work\GameDev\_IDE\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\backward\backward_warning.h|32|warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.|
..\..\yake\factory\policies.h|19|error: looser throw specifier for `virtual yake::factory::Exception::~Exception()'|
L:\Work\GameDev\_IDE\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\exception|56|error:   overriding `virtual std::exception::~exception() throw ()'|
..\..\yake\factory\dynamic_factory.h|239|error: using typedef-name `yake::factory::factory<Kt, Interface, Signature, ErrorPolicy, InstancePolicy>::creator_t' after `struct'|
..\..\yake\factory\dynamic_factory.h||In member function `void yake::factory::factory<Kt, Interface, Signature, ErrorPolicy, InstancePolicy>::reg_ctor(const Kt&)':|
..\..\yake\factory\dynamic_factory.h|254|error: wrong number of template arguments (3, should be 2)|
..\..\yake\factory\dynamic_factory.h|128|error: provided for `template<class T, class Signature> struct yake::factory::detail::new_fn'|
..\..\yake\factory\dynamic_factory.h|254|error: invalid type in declaration before ';' token|
..\..\yake\factory\dynamic_factory.h||In member function `void yake::factory::factory<Kt, Interface, Signature, ErrorPolicy, InstancePolicy>::remove(const Kt&)':|
..\..\yake\factory\dynamic_factory.h|267|error: expected `;' before "it"|
..\..\yake\factory\dynamic_factory.h|268|error: `it' was not declared in this scope|
..\..\yake\factory\global_dynamic_factory.h|33|error: declaration of `class Interface'|
..\..\yake\factory\global_dynamic_factory.h|19|error:  shadows template parm `class Interface'|
..\..\yake\factory\global_dynamic_factory.h|39|error: declaration of `class Interface'|
..\..\yake\factory\global_dynamic_factory.h|19|error:  shadows template parm `class Interface'|
..\..\yake\factory\global_dynamic_factory.h|44|error: declaration of `class Interface'|
..\..\yake\factory\global_dynamic_factory.h|19|error:  shadows template parm `class Interface'|
||=== Build finished: 14 errors, 36 warnings ===|


I'm not sure exactly what is going on. Clearly something about Yake from 0.7 to 0.8 is different enough that I'd get this result, but I'm guessing because something about C::B's STL may not be current enough for Yake 0.8? Something related to iostream being depreciated? I'm really not sure. I know that C::B isn't really what Yake is built on. I have experienced some mild issues using Yake with it before. More related to getting things set up rather than problems actually compiling. I might have to resort to trying VC++ to eliminate the possibilities.

Edit: I'm also mildly dyslexic, which is why I inverted the version numbers even though I knew Yake hadn't reached 1.0 yet. It's a problem. cheesy
« Last Edit: June 10, 2009, 10:14:57 PM by JulyForToday » Logged
JulyForToday
Newbie
*
Posts: 3


View Profile
« Reply #3 on: June 29, 2009, 12:28:12 AM »

I apologize for the double post. It's been a little while and I think I've isolated my problem. I've changed the thread's title to reflect it (in case others have the same problem, and can find it).

I noticed that between yake 0.7 and 0.8 that yakeprerequisites.h is a bit different. Of course this file deals with all the includes for Yake Base. After a lot of monkeying around and pulling my hair out, the problem is that there are certain includes that are missing that GCC needs. Apparently with GCC 4.3 includes are more strict, which is causing the trouble.

It was a bit bewildering at first A) cause I'm a n00b grin and B) because the errors I was getting were not consistent. At first it was just the vector operator issue, but sometimes i would try something, and I'd still have errors, but entirely different ones. After some head bashing, here is what I got to work:

Fresh CodeBlocks 8.02 and my own MinGW (GCC 4.4) installation (via TDM). Fresh right-out-of-the-archive Yake 8.0 with dependencies unpacked correctly.

Problem 1: First you get 5 "no match for operator" errors in yakevector.h
Fix: add #include <iostream>  in yakeprerequisites.h  (if I add .h at the end it doesn't work... GCC strict funkiness I suspect)

Problem 2: 3 'memcpy' not declared in this scope in yakematrix3.h
Fix: add #include <memory.h> in yakeprerequisites.h (if I DONT add .h it doesn't work... See why I said funky?)

Problem 3: 5 errors 'fopen,fread,fclose,UCHAR_MAX' not declared in yakeMersenneTwister.h
Fix 1: add #include <limits.h> in yakeprerequisites.h (gets rid of both UCHAR_MAX errors)
Fix 2: add #include <stdio.h> in yakeprerequisites.h (gets rid of fopen,fread,fclose errors)

Now we get to Problem 4. This one is more complicated and is very much similar to the errors in my previous post. Only this time it doesn't have the crap about depreciated headers (Probably because I'm running the most up-to-date stable version of GCC I can, rather than the one bundled with C::B).

Problem 4:

Quote
Compiling right along.......

Boom:

..\..\yake\factory\policies.h|19|error: looser throw specifier for 'virtual yake::factory::Exception::~Exception()'|
c:\mingw\bin\..\lib\gcc\mingw32\4.4.0\include\c++\exception|63|error:   overriding 'virtual std::exception::~exception() throw ()'|
..\..\yake\factory\dynamic_factory.h|239|error: using typedef-name 'yake::factory::factory<Kt, Interface, Signature, ErrorPolicy, InstancePolicy>::creator_t' after 'struct'|
..\..\yake\factory\dynamic_factory.h|238|error: 'yake::factory::factory<Kt, Interface, Signature, ErrorPolicy, InstancePolicy>::creator_t' has a previous declaration here|
..\..\yake\factory\dynamic_factory.h|239|error: friend declaration does not name a class or function|
..\..\yake\factory\dynamic_factory.h||In member function 'void yake::factory::factory<Kt, Interface, Signature, ErrorPolicy, InstancePolicy>::reg_ctor(const Kt&)': |
..\..\yake\factory\dynamic_factory.h|254|error: wrong number of template arguments (3, should be 2)|
..\..\yake\factory\dynamic_factory.h|128|error: provided for 'template<class T, class Signature> struct yake::factory::detail::new_fn'|
..\..\yake\factory\dynamic_factory.h|254|error: invalid type in declaration before ';' token|
..\..\yake\factory\dynamic_factory.h||In member function 'void yake::factory::factory<Kt, Interface, Signature, ErrorPolicy, InstancePolicy>::remove(const Kt&)': |
..\..\yake\factory\dynamic_factory.h|267|error: expected ';' before 'it'|
..\..\yake\factory\dynamic_factory.h|268|error: 'it' was not declared in this scope|
..\..\yake\factory\global_dynamic_factory.h|33|error: declaration of 'class Interface'|
..\..\yake\factory\global_dynamic_factory.h|19|error:  shadows template parm 'class Interface'|
..\..\yake\factory\global_dynamic_factory.h|39|error: declaration of 'class Interface'|
..\..\yake\factory\global_dynamic_factory.h|19|error:  shadows template parm 'class Interface'|
..\..\yake\factory\global_dynamic_factory.h|44|error: declaration of 'class Interface'|
..\..\yake\factory\global_dynamic_factory.h|19|error:  shadows template parm 'class Interface'|
||=== Build finished: 16 errors, 14 warnings ===|


Pretty much the same problem from the previous post, except now there are 2 more errors. As for the fix to this, I'm not sure. After digging around on Google, I was able to find the includes for the first 3 problems. This seems more complicated than just missing an include. But I could be wrong.

It would be very helpful to know how many other people use an alternative IDE or compiler (rather than the typical VC) and if anyone else is having similar problems with something like Code::Blocks / GCC. Or even if you use C::B and GCC but everything works fine.

This is a forum. Posting is a good thing. Smiley
« Last Edit: June 29, 2009, 12:33:54 AM by JulyForToday » Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.091 seconds with 20 queries.