Step by step of Compiling GEOtop Mackanzie
Thanks to Ageel Bushara who provided this useful tutorial
- First you have to open eclipse from the executable file in your application folder,
Opening eclipse through the executable is also discussed in http://dev.eclipse.org/mhonarc/lists/photran/msg00645.html;
Then make sure you have installed the package PHOTRAN. After you installed photran, make sure that you activate the fortran perspective within your project; go to window in the main menu of your eclipse project then select open perspective then other and finally select Fortran
Create FluitTurtleStaticLibrary, as usual, then:
right click on FluitTurtleStaticLibrary then properties then settings then directories and build Steps. In the command line you have to write: ranlib ${project_loc}/Debug/*.a . Make sure there are no spaces
Your FluidTurtleStaticLibrary looks like this:
- Create another static library, I name it Micro_2_Geotop
- If you using Meckanzie version from the svn, you have to leave only the fortran files in the EXTERN folder while coping c files to Meckanzie folder of Mackanzie Geotop.
- After you created EXTERN folder in your project, you have to add fortran files to the created EXTERN folder by right click on Microm_2_Geotop then new, then file from template (see screen-shot above)
Make sure that you do not include the directories again, as done for case 1,FluitTurtleStaticLibrary.
You also have to write:ranlib ${project_loc}/Debug/*.a , without spaces, as in case 1 ,FluitTurtleStaticLibrary,
- make sure you activate the fortran compiler (GNU fortran compiler) in the tool chain editor
create your executable project as usual (in my case Geotop_Mackenzie), you have to add the static libraries (FluitTurtleStaticLibrary and Micro_2_Geotop) to you project and make sure they are in the same order.
in settings->directories make sure to include the directories of the FluidTurtle libraries (ASCII, FLUIDTURTLE...)
- compile it!
- To run the simulation, click the run button in your eclipse project then run configuration
- You are in run configuration (above),for the first time you select c/c++ local application and then press the new button to create configuration.
- After the configurations have been created ( in my case Geotop_Mackenzie Debug), put the path of your simulations in the arguments , make sure you put forward slash (/) at the end of your working path
- Finally click on the run button in the window and click run.
