Closed
Description
main.go:
package main
import (
"fmt"
"strings"
)
func main() {
s := strings.Replace("abc", "a", "x", -1)
fmt.Println(s)
}
run:
$ tinygo run main.go
Undefined symbols for architecture x86_64:
"_internal/bytealg.CountString", referenced from:
_main in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: failed to link /var/folders/kt/gfbj96zj1jvd9tsbbfjcg94h0000gn/T/tinygo175846444/main: exit status 1
$ go run main.go
xbc
How can I fix this?