1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

dl: add get_libname function (#8909)

This commit is contained in:
StunxFS
2021-02-23 03:46:28 -04:00
committed by GitHub
parent fd59182659
commit fcc2094719
4 changed files with 11 additions and 2 deletions

View File

@ -6,7 +6,7 @@ import dl
type FNAdder = fn (int, int) int
fn main() {
library_file_path := os.join_path(os.getwd(), 'library$dl.dl_ext')
library_file_path := os.join_path(os.getwd(), dl.get_libname('library'))
handle := dl.open(library_file_path, dl.rtld_lazy)
eprintln('handle: ${ptr_str(handle)}')
mut f := &FNAdder(0)