Skip to content

bytealg.CountString is not supported #424

Closed
@1l0

Description

@1l0

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions