Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

GLPK/Ada

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

Ada is a programming language defined in ISO/IEC 8652:2012. Ada can call C libraries directly. The following program glpkversion.adb invokes glp_version() to output the version of the GLPK library. with Ada.Text_IO; use Ada.Text_IO; with Interfaces.C; use Interfaces.C; with Interfaces.C.Strings; procedure glpkversion is function glp_version return Interfaces.C.Strings.chars_ptr; pragma Import (C, glp_version, "glp_version"); begin Put_LINE(Strings.Value(glp_version)); end glpkversion; Compile, bind and link it with gcc -c glpkversion.adb gnatbind glpkversion gnatlink -lglpk glpkversion A more elaborate example of using GLPK with Ada may be found in the Futoshiki application in KuKu3.