Skip to main content
Actually this _is_ an answer to the headline question!
Source Link
Simon Wright
  • 25.5k
  • 2
  • 41
  • 68

This isn't really an answer, butis a simple example of using a GNAT projectProject to build with Florist. I assume that $ADA_PROJECT_PATH includes the directory where florist.gpr is installed (in my case, $HOME/local/lib/gnat).

The sample program (I couldn't find any simple Florist demos on the web, are there any?), in id.adb:

with POSIX.Process_Identification; with Ada.Text_IO; use Ada.Text_IO; procedure Id is begin Put_Line (POSIX.To_String (POSIX.Process_Identification.Get_Login_Name)); end Id; 

The project file (id.gpr), in the same directory as id.adb:

with "florist"; project Id is for Main use ("id.adb"); for Object_Dir use ".build_id"; for Exec_Dir use "."; end Id; 

Build with

$ gnatmake -p -P id.gpr object directory "/Users/simon/florist-gpl-2010-src/demo/.build_id" created for project id gcc -c -I- -gnatA /Users/simon/florist-gpl-2010-src/demo/id.adb gnatbind -I- -x /Users/simon/florist-gpl-2010-src/demo/.build_id/id.ali gnatlink /Users/simon/florist-gpl-2010-src/demo/.build_id/id.ali -lflorist -o /Users/simon/florist-gpl-2010-src/demo/id 

and run:

$ ./id simon 

This isn't really an answer, but a simple example of using a GNAT project with Florist. I assume that $ADA_PROJECT_PATH includes the directory where florist.gpr is installed (in my case, $HOME/local/lib/gnat).

The sample program (I couldn't find any simple Florist demos on the web, are there any?), in id.adb:

with POSIX.Process_Identification; with Ada.Text_IO; use Ada.Text_IO; procedure Id is begin Put_Line (POSIX.To_String (POSIX.Process_Identification.Get_Login_Name)); end Id; 

The project file (id.gpr), in the same directory as id.adb:

with "florist"; project Id is for Main use ("id.adb"); for Object_Dir use ".build_id"; for Exec_Dir use "."; end Id; 

Build with

$ gnatmake -p -P id.gpr object directory "/Users/simon/florist-gpl-2010-src/demo/.build_id" created for project id gcc -c -I- -gnatA /Users/simon/florist-gpl-2010-src/demo/id.adb gnatbind -I- -x /Users/simon/florist-gpl-2010-src/demo/.build_id/id.ali gnatlink /Users/simon/florist-gpl-2010-src/demo/.build_id/id.ali -lflorist -o /Users/simon/florist-gpl-2010-src/demo/id 

and run:

$ ./id simon 

This is a simple example of using a GNAT Project to build with Florist. I assume that $ADA_PROJECT_PATH includes the directory where florist.gpr is installed (in my case, $HOME/local/lib/gnat).

The sample program (I couldn't find any simple Florist demos on the web, are there any?), in id.adb:

with POSIX.Process_Identification; with Ada.Text_IO; use Ada.Text_IO; procedure Id is begin Put_Line (POSIX.To_String (POSIX.Process_Identification.Get_Login_Name)); end Id; 

The project file (id.gpr), in the same directory as id.adb:

with "florist"; project Id is for Main use ("id.adb"); for Object_Dir use ".build_id"; for Exec_Dir use "."; end Id; 

Build with

$ gnatmake -p -P id.gpr object directory "/Users/simon/florist-gpl-2010-src/demo/.build_id" created for project id gcc -c -I- -gnatA /Users/simon/florist-gpl-2010-src/demo/id.adb gnatbind -I- -x /Users/simon/florist-gpl-2010-src/demo/.build_id/id.ali gnatlink /Users/simon/florist-gpl-2010-src/demo/.build_id/id.ali -lflorist -o /Users/simon/florist-gpl-2010-src/demo/id 

and run:

$ ./id simon 
Source Link
Simon Wright
  • 25.5k
  • 2
  • 41
  • 68

This isn't really an answer, but a simple example of using a GNAT project with Florist. I assume that $ADA_PROJECT_PATH includes the directory where florist.gpr is installed (in my case, $HOME/local/lib/gnat).

The sample program (I couldn't find any simple Florist demos on the web, are there any?), in id.adb:

with POSIX.Process_Identification; with Ada.Text_IO; use Ada.Text_IO; procedure Id is begin Put_Line (POSIX.To_String (POSIX.Process_Identification.Get_Login_Name)); end Id; 

The project file (id.gpr), in the same directory as id.adb:

with "florist"; project Id is for Main use ("id.adb"); for Object_Dir use ".build_id"; for Exec_Dir use "."; end Id; 

Build with

$ gnatmake -p -P id.gpr object directory "/Users/simon/florist-gpl-2010-src/demo/.build_id" created for project id gcc -c -I- -gnatA /Users/simon/florist-gpl-2010-src/demo/id.adb gnatbind -I- -x /Users/simon/florist-gpl-2010-src/demo/.build_id/id.ali gnatlink /Users/simon/florist-gpl-2010-src/demo/.build_id/id.ali -lflorist -o /Users/simon/florist-gpl-2010-src/demo/id 

and run:

$ ./id simon