EOSERV Forum > Programming > Compiler decided not to work
Topic is locked.
Page: << 1 2 >>
Compiler decided not to work
Author Message
Post #195704 Compiler decided not to work

I'm not sure why this is happening seeing as I didn't change anything other than a few string values before compilation, but it refuses to compile even after undoing. :l

I'm guessing something is out of date, but i'm not sure which files or even where to get them.

Error log:

||=== Build: CONSOLE in eoserv (compiler: GNU GCC Compiler) ===|

c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.1\include\c++\bits\c++0x_warning.h|32|error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\util\..\util.hpp|24|warning: identifier 'decltype' is a keyword in C++11 [-Wc++0x-compat]|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\fwd\character.hpp|15|warning: scoped enums only available with -std=c++11 or -std=gnu++11 [enabled by default]|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\fwd\character.hpp|30|warning: scoped enums only available with -std=c++11 or -std=gnu++11 [enabled by default]|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\fwd\character.hpp|41|warning: scoped enums only available with -std=c++11 or -std=gnu++11 [enabled by default]|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\fwd\character.hpp|49|warning: scoped enums only available with -std=c++11 or -std=gnu++11 [enabled by default]|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\fwd\character.hpp|67|warning: scoped enums only available with -std=c++11 or -std=gnu++11 [enabled by default]|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\fwd\character.hpp|73|warning: scoped enums only available with -std=c++11 or -std=gnu++11 [enabled by default]|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\fwd\character.hpp|79|warning: scoped enums only available with -std=c++11 or -std=gnu++11 [enabled by default]|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\fwd\character.hpp|90|warning: scoped enums only available with -std=c++11 or -std=gnu++11 [enabled by default]|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\fwd\character.hpp|101|warning: scoped enums only available with -std=c++11 or -std=gnu++11 [enabled by default]|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\fwd\character.hpp|108|warning: scoped enums only available with -std=c++11 or -std=gnu++11 [enabled by default]|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\fwd\character.hpp|113|warning: scoped enums only available with -std=c++11 or -std=gnu++11 [enabled by default]|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\fwd\character.hpp|120|warning: scoped enums only available with -std=c++11 or -std=gnu++11 [enabled by default]|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\fwd\character.hpp|126|warning: scoped enums only available with -std=c++11 or -std=gnu++11 [enabled by default]|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\fwd\character.hpp|132|warning: scoped enums only available with -std=c++11 or -std=gnu++11 [enabled by default]|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\fwd\character.hpp|140|warning: scoped enums only available with -std=c++11 or -std=gnu++11 [enabled by default]|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\fwd\character.hpp|146|warning: scoped enums only available with -std=c++11 or -std=gnu++11 [enabled by default]|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\fwd\character.hpp|157|warning: scoped enums only available with -std=c++11 or -std=gnu++11 [enabled by default]|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\fwd\guild.hpp|15|warning: scoped enums only available with -std=c++11 or -std=gnu++11 [enabled by default]|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\fwd\guild.hpp|43|warning: scoped enums only available with -std=c++11 or -std=gnu++11 [enabled by default]|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\fwd\npc.hpp|20|warning: scoped enums only available with -std=c++11 or -std=gnu++11 [enabled by default]|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\fwd\npc.hpp|26|warning: scoped enums only available with -std=c++11 or -std=gnu++11 [enabled by default]|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\fwd\map.hpp|19|warning: scoped enums only available with -std=c++11 or -std=gnu++11 [enabled by default]|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\fwd\party.hpp|12|warning: scoped enums only available with -std=c++11 or -std=gnu++11 [enabled by default]|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\fwd\player.hpp|12|warning: scoped enums only available with -std=c++11 or -std=gnu++11 [enabled by default]|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\fwd\world.hpp|16|warning: scoped enums only available with -std=c++11 or -std=gnu++11 [enabled by default]|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\fwd\world.hpp|26|warning: scoped enums only available with -std=c++11 or -std=gnu++11 [enabled by default]|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\fwd\world.hpp|35|warning: scoped enums only available with -std=c++11 or -std=gnu++11 [enabled by default]|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\fwd\world.hpp|43|warning: scoped enums only available with -std=c++11 or -std=gnu++11 [enabled by default]|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\fwd\eodata.hpp|20|warning: scoped enums only available with -std=c++11 or -std=gnu++11 [enabled by default]|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\eodata.hpp|101|error: 'array' in namespace 'std' does not name a type|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\eodata.hpp|102|error: 'array' in namespace 'std' does not name a type|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\eodata.hpp|228|error: 'array' in namespace 'std' does not name a type|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\eodata.hpp|229|error: 'array' in namespace 'std' does not name a type|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\eodata.hpp|315|error: 'array' in namespace 'std' does not name a type|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\eodata.hpp|316|error: 'array' in namespace 'std' does not name a type|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\eodata.hpp|394|error: 'array' in namespace 'std' does not name a type|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\eodata.hpp|395|error: 'array' in namespace 'std' does not name a type|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\config.hpp|22|error: expected template-name before '<' token|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\config.hpp|22|error: expected '{' before '<' token|

C:\Users\Nick\Desktop\trunk 305 EODelta\src\config.hpp|22|error: expected unqualified-id before '<' token|

c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.1\..\..\..\..\include\winnt.h|2444|error: expected declaration before end of line|

||=== Build failed: 13 error(s), 30 warning(s) (0 minute(s), 1 second(s)) ===|


9 years, 42 weeks ago
Post #195711 Re: Compiler decided not to work

have you tried adding -std=gnu++11
to the compiler command line like it asks?

---
I not hacker

“Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its
whole life believing that it is stupid.” - Albert Einstein : Really Great Quote Ramy!
9 years, 42 weeks ago
Post #195712 Re: Compiler decided not to work

It's enabling that by default anyway, that's why it's giving me that error, because it's detecting certain stuff and thinking it needs it.

But yeah, I've already tried enabling it myself as well. It still gives the same error.

9 years, 41 weeks ago
Post #195713 Re: Compiler decided not to work

Are you using TDM's MingW? Also, you should be able to just get someone to zip you their MingW and use that if you are compiling EOSERV if something has drastically changed that is throwing a compile error. 

9 years, 41 weeks ago
Post #195714 Re: Compiler decided not to work

Are you using TDM's MingW? Also, you should be able to just get someone to zip you their MingW and use that if you are compiling EOSERV if something has drastically changed that is throwing a compile error. 

9 years, 41 weeks ago
Post #195715 Re: Compiler decided not to work

Yeah, it's the weirdest error, because I enable those and it still gives me the same error.

It compiled a couple of times before it started giving me that error and then it suddenly started giving me the error when i tried to compile it after changing the value of a string. Then when i tried to undo it and compile, it still gave me the error.

9 years, 41 weeks ago
Post #195716 Re: Compiler decided not to work

You could try downloading a clean official build and replacing only the source code files with yours. Not sure if that is necessarily a fix, but if you have altered something in the build options somehow that might be a work around. If you do a lot of heavy EOSERV source code deviations, it is probably a good idea to archive your source prior to heavy code modifications. This is a great help if you are looking for things that compile properly but somehow don't turn out as expected. Sausage, for instance, has 425 revisions archived :P

9 years, 41 weeks ago
Post #195717 Re: Compiler decided not to work

Looking back, I don't think you should be using C++11 but rather 0x. There is probably a change in C++ 11 with scoped enums. Sausage would be the person to ask about this.

9 years, 41 weeks ago
Post #195718 Re: Compiler decided not to work

"[enabled by default]" refers to the warning, not the C++11 mode. You need to add -std=gnu++11 to your compiler flags to use C++11 features.

C++0x is the WIP name of C++11, and -std=gnu++0x and -std=gnu++11 are identical (except the first name is deprecated), as far as I know. Do not use -std=c++11 as that will enable strict conformance mode, and disable a lot of platform-specific features that you probably want don't want to disable.

9 years, 41 weeks ago
Post #195721 Re: Compiler decided not to work

I added -std=gnu++11 to the other options tab next to compiler flags but it just keeps giving me the same error.

I think it's because it's because i'm using an updated compiler, but I don't see how it compiled the first few times. And I have no clue what updated. ;.;

9 years, 41 weeks ago
Post #195723 Re: Compiler decided not to work

well let's see. maybe something changed in project file. when mine builds, it builds from this command line...


mingw32-g++.exe -Wextra -Wall -std=gnu++0x -include ../src/stdafx.h -DEOSERV_PROJECT -DEOSERV_PROJECT_CBP -DEOSERV_MINGW -O2 -DDATABASE_MYSQL -DDATABASE_SQLITE -I..\include -I.\allegro-5.0.7-mingw-4.6.1-tdm\include -c "root\EODelta\trunk 305 EODelta\src\arena.cpp" -o ..\obj\Release\src\arena.o



what does yours say?

---
I not hacker

“Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its
whole life believing that it is stupid.” - Albert Einstein : Really Great Quote Ramy!
9 years, 41 weeks ago
Post #195724 Re: Compiler decided not to work

You probably passed those by using the standard build option, however if you modify a header file (hpp) that should function the same as selecting rebuild for the most part which recreates all of the project's object files. I would think if you downgrade to use gnu++0x with c++0x you should have no problems. 

9 years, 41 weeks ago
Post #195725 Re: Compiler decided not to work

Had time to Google :) seems like a compatibility issue as referenced here: https://gcc.gnu.org/projects/cxx0x.html


9 years, 41 weeks ago
Post #195726 Re: Compiler decided not to work
Apollo posted: (12th Jul 2014, 11:09 am)

You probably passed those by using the standard build option, however if you modify a header file (hpp) that should function the same as selecting rebuild for the most part which recreates all of the project's object files. I would think if you downgrade to use gnu++0x with c++0x you should have no problems. 


Good insight, it certainly happened after he edited a header file. It doesn't seem to be any recent changes to the compiler since I tried w/ mine. But what's interesting is that they are only Warnings.

Seems perhaps the compilation would end up succeeding if he let it. I wonder at what cost.
---
I not hacker

“Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its
whole life believing that it is stupid.” - Albert Einstein : Really Great Quote Ramy!
9 years, 41 weeks ago
Post #195727 Re: Compiler decided not to work

This error won't appear if he doesn't use c++11 stuff like the array class.

You should try compiling a simple program with the auto keyword (or any other c++11 stuff) in cmd and see what the result is,

it might be a problem in the code blocks,because for this to occur suddenly,you must had the c++0x flag ticked from before.

---
Remember when is not an organization nor a fucking group , it's simply an idea that we believe in
and live for.
The priority of Remember when should come before oxygen , as oxygen is cosmetic even life itself is
cosmetic,that's why offer our worthless lives to The "Remember when"
9 years, 41 weeks ago
Page: << 1 2 >>
Topic is locked.
EOSERV Forum > Programming > Compiler decided not to work