Loading
|
Sferes2 is a framework for evolutionary computation (EC) experiments and especially for evolutionary robotics (ER). Its main goal is to help researchers in EC and ER to efficiently try new ideas. Sferes2 has been inspired by sferes, another (older and no more maintained) framework for ER. |
Compiler: gcc (4.4.1 <TDM-2 mingw32>)
IDE: Code::Blocks (10.05), Eclipse (Helios Service Release 2)
Windows 7 Ultimate 64bits and Windows XP Professional 32bits
build.bat gcc(source: http://www.phy.bnl.gov/~bviren/dayabay/offline/external-trunk/Boost/boost_1_34_1/doc/html/jam/building.html)
bjam --toolset=gcc "--prefix=C:\DestinationFolder" installwhere DestinationFolder is whatever folder path you want (source: http://wiki.codeblocks.org/index.php?title=BoostWindowsQuickRef)
Open the Settings menu and select "Global variables...".
Click the "New" button next to the Current variable list, specify a name like "boost", and hit OK.
In the "base" field of the Builtin fields section, browse for the root folder of your Boost installation (e.g. "C:\Program Files (x86)\CodeBlocks\include\boost-1_45"). The Boost installation path is the path you specified in the --prefix option of the build command.
In the "include" field, browse for the "include\boost-1_45" subfolder of your Boost installation.
Hit the Close button to save your global variable
Right-click your project's name in the Projects section of the Management window and select "Build options..." (or else right-click your project's name, select "Properties", then click on the button "Project's build options").
Select the "Search directories" tab.
With the "Compiler" subtab selected, click the Add button, enter "$(#boost.include)" (without the quotes), and hit OK.
If you are using the bundled version of MinGW with Code::Blocks, and you used your C::B installation in the --prefix option as recommended, the following step is unnecessary (but better to do it still!).
With the "Linker" subtab (still under the "Search directories" tab) selected, click the Add button, enter "$(#boost.lib)" (without the quotes), and hit OK.
regex -> because we have #include
mgw44 -> because we compiled boost with gcc (
-d -> each .a has a release and a debug version. -d stands for debug. We would have to add "libboost_regex-mgw44-mt-1_45.a" if we targeted a release version.
1_45 -> this is the Boost version.
Create a new empty project (in this example we named it "'sferes").
Copy-paste the 3 folders examples, exp and sferes in the project folder (e.g. "C:\Program Files (x86)\CodeBlocksProjects\sferes1").
Right-click your project's name in the Projects section of the Management window and select "Add files recursively".
Browse for "'sferes" project location, hit "OK" then hit "OK" once again (no need to change the files selection), then select all targets..
\examples\* except \examples\ex_ea.cpp (or any exp .cpp you want to compile, but only 1!)
\exp\example\example.cpp
\modules\*
\scripts\*
\sferes\dbg\dbg.cpp
\tests\*
mingw32-make.exe compiler=gcc arch=ia32 runtime=mingwThis will produce the following 6 dll in \tbb\build\windows_ia32_gcc_mingw_debug and \tbb\build\windows_ia32_gcc_mingw_release:
tbbmalloc.dll
tbbmalloc_debug.dll
tbbmalloc_proxy.dll
tbbmalloc_proxy_debug.dll
tbb.dll
tbb_debug.dll
In \sferes\parallel.hpp, delete the line #define NO_PARALLEL that you previously added at the begin of the file.
As we did for Boost, we need to create a new "Global variable" we'll call TBB in Code::Blocks. The "base" field as well as the "include" field should point to the folder \tbb\include\ (feel free to copy this folder somewhere else, usually in \CodeBlocks\include\tbb like Boost).
We have to add "$(#tbb.include)" in the "Compiler" subtab, "$(#tbb.lib)" in the "Linker" subtab and add the 6 tbb*.dll in the "Linker settings" tab.
"G:\Win7\PROGRAMMING\CodeBlocks\include\boost-1_45" (Boost)
"G:\Win7\PROGRAMMING\EclipseProjects\testcpp2\src" (Sferes core and modules)
"G:\Win7\PROGRAMMING\CodeBlocks\include" (TBB) (only if TBB is enabled)
"G:\Win7\PROGRAMMING\CodeBlocks\include\eigen-2_0_15" (Eigen2 for nn2 module*)
"G:\Win7\PROGRAMMING\CodeBlocks\include\SDL" (only if SDL is enabled)
boost_filesystem-mgw44-mt-d-1_45
boost_program_options-mgw44-mt-d-1_45
boost_serialization-mgw44-mt-d-1_45
boost_system-mgw44-mt-d-1_45
mingw32 (only if SDL is enabled)
SDLmain (only if SDL is enabled)
SDL (only if SDL is enabled)
tbb_debug (only if TBB is enabled)
tbbmalloc_debug (only if TBB is enabled)
tbbmalloc_proxy_debug (only if TBB is enabled)
boost_filesystem-mgw44-mt-1_45
boost_program_options-mgw44-mt-1_45
boost_serialization-mgw44-mt-1_45
boost_system-mgw44-mt-1_45
mingw32 (only if SDL is enabled)
SDLmain (only if SDL is enabled)
SDL (only if SDL is enabled)
tbb (only if TBB is enabled)
tbbmalloc (only if TBB is enabled)
tbbmalloc_proxy (only if TBB is enabled)
"G:\Win7\PROGRAMMING\CodeBlocks\lib" (Boost)
"G:\Win7\PROGRAMMING\CodeBlocks\lib\windows_ia32_gcc_mingw_debug" (TBB)
"G:\Win7\PROGRAMMING\CodeBlocks\lib" (Boost)
"G:\Win7\PROGRAMMING\CodeBlocks\lib\windows_ia32_gcc_mingw_release" (TBB)