Open Techatrix opened 9 months ago
I met this problem while enhancing raylib-zig.
Update: is typo. The error message is the same.
pub const Vector3 = extern struct {
x: f32,
y: f32,
z: f32,
pub fn init(x: f32, y: f32, z: f32) Vector3 {
return Vector3{ .x = x, .y = y, .z = z };
}
pub const add = rlm.vector2Add;
pub const sub = rlm.vector2Subtract;
};
_ = p.add(q); // not member function
I met this problem while enhancing raylib-zig.
typo?
< pub const add = rlm.vector2Add;
< pub const sub = rlm.vector2Subtract;
> pub const add = rlm.vector3Add;
> pub const sub = rlm.vector3Subtract;
Yes, it is typo. Thanks!
Zig Version
0.12.0-dev.1802+56deb5b05
Steps to Reproduce and Observed Behavior
output:
Expected Behavior
compile successfully just like when calling a non pointer member function: