Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
callable [2019/01/26 11:02]
oroehrig ↷ Links adapted because of a move operation
callable [2019/02/12 13:22] (current)
gawrilow [Building a program]
Line 1: Line 1:
 ===== Callable Library ===== ===== Callable Library =====
  
-Starting with release 2.11, polymake offers an alternative interface for integration with other software, a C++ callable library.+polymake offers an alternative interface for integration with other software, a C++ callable library.
  
 This page describes only those parts of the interface which are specific to the callable library. ​ Software collaborating with polymake may (and in most cases even have to) use the Object and Function interfaces too; they are described on the [[user_guide:​extend:​clients|Client Development page]]. This page describes only those parts of the interface which are specific to the callable library. ​ Software collaborating with polymake may (and in most cases even have to) use the Object and Function interfaces too; they are described on the [[user_guide:​extend:​clients|Client Development page]].
Line 21: Line 21:
   * ''​%%add_extension("​DIRECTORY"​)%%''​ loads the extension rooted in the given directory. ​ Repeated calls with the same path have no effect.   * ''​%%add_extension("​DIRECTORY"​)%%''​ loads the extension rooted in the given directory. ​ Repeated calls with the same path have no effect.
   * ''​newScope()''​ create an instance of ''​[[callable#​scope_class|polymake::​perl::​Scope]]''​ .   * ''​newScope()''​ create an instance of ''​[[callable#​scope_class|polymake::​perl::​Scope]]''​ .
-  * ''​%%include("​RULE_FILE"​)%%''​ parses one additional rule file in the context of the current application. See the corresponding interactive command ''​[[:​release_docs:​latest:core.html#​include|include()]]''​ .+  * ''​%%include("​RULE_FILE"​)%%''​ parses one additional rule file in the context of the current application. See the corresponding interactive command ''​[[reldocs>latest/core.html#​include|include()]]''​ .
   * ''​%%set_preference("​label"​)%%''​ \\ ''​%%reset_preference("​label"​)%%''​ correspond to the interactive commands of the same names.   * ''​%%set_preference("​label"​)%%''​ \\ ''​%%reset_preference("​label"​)%%''​ correspond to the interactive commands of the same names.
   * ''​%%set_custom("​name",​ value)%%''​ \\ ''​%%reset_custom("​name"​)%%'' ​ allow to change values of custom variables. ​ The variable names must be specified fully qualified (unless they reside in the current application package) and with appropriate leading symbol designating its perl type, that is, ''​$''​ for scalars, ''​@''​ for arrays, and ''​%''​ for hash maps.  Note that ''​get_custom()''​ is now a free function available for [[user_guide:​extend:​clients#​miscellaneous_functions|clients]] too.   * ''​%%set_custom("​name",​ value)%%''​ \\ ''​%%reset_custom("​name"​)%%'' ​ allow to change values of custom variables. ​ The variable names must be specified fully qualified (unless they reside in the current application package) and with appropriate leading symbol designating its perl type, that is, ''​$''​ for scalars, ''​@''​ for arrays, and ''​%''​ for hash maps.  Note that ''​get_custom()''​ is now a free function available for [[user_guide:​extend:​clients#​miscellaneous_functions|clients]] too.
Line 42: Line 42:
 ==== Building a program ==== ==== Building a program ====
  
-You can use polymake callable library for building your programs only after having installed it at the final destination,​ that is, after ''​make install''​ .  To facilitate the build process, polymake comes with a small utility ''​polymake-config''​ which resides side by side with the main script ''​polymake''​ in the binary installation directory. ​ Calling this utility with various options you can obtain the compiler and linker options needed for successful build of your program. ​ You can even insert the calls in your Makefile directly, using the GNU make ''​$(shell)''​ function or `backtick` shell substitution.+You can use polymake callable library for building your programs only after having installed it at the final destination,​ that is, after ''​ninja install''​ .  To facilitate the build process, polymake comes with a small utility ''​polymake-config''​ which resides side by side with the main script ''​polymake''​ in the binary installation directory. ​ Calling this utility with various options you can obtain the compiler and linker options needed for successful build of your program. ​ You can even insert the calls in your Makefile directly, using the GNU make ''​$(shell)''​ function or `backtick` shell substitution.
  
 Following configuration parameters can be requested from ''​polymake-config'':​ Following configuration parameters can be requested from ''​polymake-config'':​
Line 59: Line 59:
 You can add an option ''​%%--debug%%''​ before ''​%%--cflags%%'',​ ''​%%--ldflags%%'',​ or ''​%%--libs%%''​ if you are going to debug your program together with polymake. ​ Compiler options displayed without ''​%%--debug%%''​ provide for a build optimized for execution speed. You can add an option ''​%%--debug%%''​ before ''​%%--cflags%%'',​ ''​%%--ldflags%%'',​ or ''​%%--libs%%''​ if you are going to debug your program together with polymake. ​ Compiler options displayed without ''​%%--debug%%''​ provide for a build optimized for execution speed.
  
-For compilation with debugging enabled run ''​%%make Debug=y%%''​ (see also [[user_guide:​extend:​clients#​building_and_debugging|here]]) and make sure to install with ''​%%make install Debug=y%%''​. When you run the program you need to set ''​POLYMAKE_CLIENT_SUFFIX=-d''​ either via ''​.gdbinit''​ or your environment.+
  • callable.1548500539.txt.gz
  • Last modified: 2019/01/26 11:02
  • by oroehrig