github.com/ebitengine/purego@v0.8.0-alpha.2.0.20240512170805-6cd12240d332/internal/cgo/dlfcn_cgo_unix.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // SPDX-FileCopyrightText: 2024 The Ebitengine Authors 3 4 //go:build freebsd || linux 5 6 package cgo 7 8 /* 9 #cgo LDFLAGS: -ldl 10 11 #include <dlfcn.h> 12 */ 13 import "C" 14 15 // all that is needed is to assign each dl function because then its 16 // symbol will then be made available to the linker and linked to inside dlfcn.go 17 var ( 18 _ = C.dlopen 19 _ = C.dlsym 20 _ = C.dlerror 21 _ = C.dlclose 22 )