[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4586: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4588: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4589: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4590: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
AI Challenge Forums • View topic - C++ compiler flags

It is currently Tue Sep 26, 2017 9:09 am Advanced search

C++ compiler flags

New Language? Want more libraries? Post Here.

C++ compiler flags

Postby Andrei » Wed Nov 02, 2011 9:06 pm

As far as I understand gcc 4.5.2 is used as a C++ compiler. But what are the compilation flags? Are they "-O3 -funroll-loops" as in the starter package makefile or somewhat else? Can I change the flags?
And if it's not possible specify arbitrary flags is there any way to enable fast math at least?
Andrei
Cadet
 
Posts: 2
Joined: Wed Nov 02, 2011 8:48 pm

Re: C++ compiler flags

Postby Parasprites » Wed Nov 02, 2011 10:14 pm

No, you can't change the compiler flags unfortunately. If you can prove a large popular demand, you may be able to convince the organizers to add a new "language" with different compiler options.

https://github.com/aichallenge/aichalle ... ompiler.py

vanilla C++ uses -O3 -funroll-loops
C++11 uses -std=c++0x -O3 (no unroll loops)


Anyway, why do you care about fast math? There's not much use for floating point here anyway.
Parasprites
Major-General
 
Posts: 224
Joined: Mon Oct 24, 2011 3:08 pm

Re: C++ compiler flags

Postby Andrei » Wed Nov 02, 2011 11:17 pm

Andrei
Cadet
 
Posts: 2
Joined: Wed Nov 02, 2011 8:48 pm

Re: C++ compiler flags

Postby Xharlie » Fri Nov 04, 2011 7:10 am

... does that mean that if I rename MyBot.cc to MyBot.cpp, I'll get C++0x or C++11 support and be able to use the fancy new STL containers and super-shiny lamdas?

Do I need to rename ALL my .cc files to .cpp? (No hardship.)

I am SO STOKED - this solves all my problems if it is true!
User avatar
Xharlie
Lieutenant
 
Posts: 13
Joined: Thu Oct 20, 2011 5:28 pm
Location: Cape Town, South Africa

Re: C++ compiler flags

Postby tmc » Sat Nov 05, 2011 1:14 am

Actually you only need to name your main file MyBot.cpp, as the name of the main file is what's used to determine the language.

Remember, GCC 4.5 C++11 features only.
tmc
Brigadier-General
 
Posts: 101
Joined: Fri Oct 28, 2011 8:42 am

Re: C++ compiler flags

Postby MLM-NL » Wed Nov 09, 2011 1:18 pm

I'm using a 3rd party library (open source) for some part, and it uses
#include <LIBNAME/internal/somefile.h>
internally. This means that I should specify an -I compiler option to make this work.

However, I don't seem to have any option to do so at this time. Am I supposed to rewrite hundreds of #include statements to relative paths, or can we somehow provide hints to the compilation script?
Or can we maybe have a "language" that is MyBot.makefile or smth?
MLM-NL
Cadet
 
Posts: 1
Joined: Wed Nov 09, 2011 1:12 pm

Re: C++ compiler flags

Postby Parasprites » Wed Nov 09, 2011 1:56 pm

Unfortunately, there's no way to use include paths at the moment. So your only options are to rewrite the library inclusions or make do without. I really hope they fix this. At the very least, they could provide a preinstalled version of common libraries i.e. Boost.
Parasprites
Major-General
 
Posts: 224
Joined: Mon Oct 24, 2011 3:08 pm


Return to Language Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron