Skip to content

Native Linking

IsaacShelton edited this page Mar 21, 2022 · 1 revision

Native Linking

There are a few ways of linking to native objects and libraries.

Command Line

  • -l - Link against library in linking path
  • -L - Add directory to linking path

Foreign

  • foreign 'libmylibrary.o' - Link against object file
  • foreign 'libmylibrary.a' - Link against static library
  • foreign 'libmylibrary.so' - Link against dynamic library
  • foreign 'libmylibrary.dll' - Link against dynamic library
  • foreign 'libmylibrary.dylib' - Link against dynamic library
  • foreign 'MyLibrary' framework - Link against MacOS framework
  • foreign 'mylibrary' library - Link against library in linking path
Clone this wiki locally