github.com/jwijenbergh/purego@v0.0.0-20240126093400-70ff3a61df13/examples/libc/main_unix.go (about)

     1  // SPDX-License-Identifier: Apache-2.0
     2  // SPDX-FileCopyrightText: 2023 The Ebitengine Authors
     3  
     4  //go:build darwin || freebsd || linux
     5  
     6  package main
     7  
     8  import "github.com/jwijenbergh/purego"
     9  
    10  func openLibrary(name string) (uintptr, error) {
    11  	return purego.Dlopen(name, purego.RTLD_NOW|purego.RTLD_GLOBAL)
    12  }