Skip to content

Commit

Permalink
Merge pull request #7 from ac2pic/windows-lib-fix
Browse files Browse the repository at this point in the history
Update windows library delimiter
  • Loading branch information
kiwidoggie committed Mar 5, 2023
2 parents 7018e2a + 18eb7cf commit 7aaca3a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/oelf/OELFGenDynlibData.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"fmt"
"io"
"path/filepath"
"runtime"
"strings"
)

Expand Down Expand Up @@ -116,7 +117,13 @@ var (
////

func OpenLibrary(name string, sdkPath string, libPath string) (*elf.File, error) {
libDirs := append([]string{sdkPath + "/lib"}, strings.Split(libPath, ":")...)
var libDelimiter string
if runtime.GOOS == "windows" {
libDelimiter = ";"
} else {
libDelimiter = ":"
}
libDirs := append([]string{sdkPath + "/lib"}, strings.Split(libPath, libDelimiter)...)
var err error
var lib *elf.File
for _, libDir := range libDirs {
Expand Down

0 comments on commit 7aaca3a

Please sign in to comment.