Link a bunch of stuff together to create an executable or shared library file. The "bunch of stuff" consists of the list of object files supplied as 'objects'. 'output_filename' should be a filename. If 'output_dir' is supplied, 'output_filename' is relative t
(self,
target_desc,
objects,
output_filename,
output_dir=None,
libraries=None,
library_dirs=None,
runtime_library_dirs=None,
export_symbols=None,
debug=0,
extra_preargs=None,
extra_postargs=None,
build_temp=None,
target_lang=None)
| 615 | EXECUTABLE = "executable" |
| 616 | |
| 617 | def link(self, |
| 618 | target_desc, |
| 619 | objects, |
| 620 | output_filename, |
| 621 | output_dir=None, |
| 622 | libraries=None, |
| 623 | library_dirs=None, |
| 624 | runtime_library_dirs=None, |
| 625 | export_symbols=None, |
| 626 | debug=0, |
| 627 | extra_preargs=None, |
| 628 | extra_postargs=None, |
| 629 | build_temp=None, |
| 630 | target_lang=None): |
| 631 | """Link a bunch of stuff together to create an executable or |
| 632 | shared library file. |
| 633 | |
| 634 | The "bunch of stuff" consists of the list of object files supplied |
| 635 | as 'objects'. 'output_filename' should be a filename. If |
| 636 | 'output_dir' is supplied, 'output_filename' is relative to it |
| 637 | (i.e. 'output_filename' can provide directory components if |
| 638 | needed). |
| 639 | |
| 640 | 'libraries' is a list of libraries to link against. These are |
| 641 | library names, not filenames, since they're translated into |
| 642 | filenames in a platform-specific way (eg. "foo" becomes "libfoo.a" |
| 643 | on Unix and "foo.lib" on DOS/Windows). However, they can include a |
| 644 | directory component, which means the linker will look in that |
| 645 | specific directory rather than searching all the normal locations. |
| 646 | |
| 647 | 'library_dirs', if supplied, should be a list of directories to |
| 648 | search for libraries that were specified as bare library names |
| 649 | (ie. no directory component). These are on top of the system |
| 650 | default and those supplied to 'add_library_dir()' and/or |
| 651 | 'set_library_dirs()'. 'runtime_library_dirs' is a list of |
| 652 | directories that will be embedded into the shared library and used |
| 653 | to search for other shared libraries that *it* depends on at |
| 654 | run-time. (This may only be relevant on Unix.) |
| 655 | |
| 656 | 'export_symbols' is a list of symbols that the shared library will |
| 657 | export. (This appears to be relevant only on Windows.) |
| 658 | |
| 659 | 'debug' is as for 'compile()' and 'create_static_lib()', with the |
| 660 | slight distinction that it actually matters on most platforms (as |
| 661 | opposed to 'create_static_lib()', which includes a 'debug' flag |
| 662 | mostly for form's sake). |
| 663 | |
| 664 | 'extra_preargs' and 'extra_postargs' are as for 'compile()' (except |
| 665 | of course that they supply command-line arguments for the |
| 666 | particular linker being used). |
| 667 | |
| 668 | 'target_lang' is the target language for which the given objects |
| 669 | are being compiled. This allows specific linkage time treatment of |
| 670 | certain languages. |
| 671 | |
| 672 | Raises LinkError on failure. |
| 673 | """ |
| 674 | raise NotImplementedError |
no outgoing calls