v icon indicating copy to clipboard operation
v copied to clipboard

Build error: tcc: error: undefined symbol 'color__Color_cprintln', tcc: error: undefined symbol 'color__Brush_cprintln'

Open RGBCube opened this issue 2 years ago • 5 comments
trafficstars

Describe the bug

Compile error (C error)

Expected Behavior

For it to compile

Current Behavior

C error (undefined function)

Reproduction Steps

Run v run test.v

Possible Solution

No response

Additional Information/Context

File: https://github.com/RGBCube/v-color/blob/a8949500a3135be39894c813d39201a4df3262b7/test.v @ https://github.com/RGBCube/v-color/commit/a8949500a3135be39894c813d39201a4df3262b7

V version

latest: Current V version: V 0.3.2 0e727ec, timestamp: 2022-11-20 16:44:58 +0200

Environment details (OS name and version, etc.)

Arch Linux x86_64, host: A4321A6421-H110 0601, kernel: 6.0.8-arch1-1, shell:bash 5.1.16,

RGBCube avatar Nov 20 '22 18:11 RGBCube

I was able to bring it down to this:

interface IFoo { foo() }

struct Foo {}

fn (f Foo) foo()

RGBCube avatar Nov 21 '22 18:11 RGBCube

Changing to

fn (f Foo) foo() {}

fixes it.

felipensp avatar Jan 09 '23 16:01 felipensp

What was the real reproducible case?

felipensp avatar Jan 09 '23 16:01 felipensp

Oh, the real case is https://GitHub.com/RGBCube/color.v, the Brush interface

RGBCube avatar Jan 09 '23 16:01 RGBCube

I was able to narrow it down to this

struct Foo {
    bar int
}

interface Bar {
    bar int
}
fn (b Bar) print() {
    print(b.bar)
}

interface Baz {
    Bar
}
fn (bz Baz) println() {
    bz.print()
    println("")
}

RGBCube avatar Mar 06 '23 13:03 RGBCube

Any updates on this? I've provided a reproducible example above

RGBCube avatar Nov 14 '23 12:11 RGBCube