On Sat Jan 4, 2025 at 4:43 PM EST, Max Schillinger wrote:
> export let @symbol("rectangle") rectangle: Rectangle;
Because you have't initialized the variable here, the linker will search
for the symbol somewhere else in another file compiled into the program.
You need to initialize with something:
export let @symbol("rectangle") rectangle = Rectangle { ... };
On Sat Jan 4, 2025 at 11:33 PM CET, Luna wrote:
> On Sat Jan 4, 2025 at 4:43 PM EST, Max Schillinger wrote:> > export let @symbol("rectangle") rectangle: Rectangle;>> Because you have't initialized the variable here, the linker will search> for the symbol somewhere else in another file compiled into the program.> You need to initialize with something:>> export let @symbol("rectangle") rectangle = Rectangle { ... };
That's it. Now it works. Thanks a lot for your help!
On Sat Jan 4, 2025 at 5:48 PM EST, Max Schillinger wrote:
> On Sat Jan 4, 2025 at 11:33 PM CET, Luna wrote:> > On Sat Jan 4, 2025 at 4:43 PM EST, Max Schillinger wrote:> > > export let @symbol("rectangle") rectangle: Rectangle;> >> > Because you have't initialized the variable here, the linker will search> > for the symbol somewhere else in another file compiled into the program.> > You need to initialize with something:> >> > export let @symbol("rectangle") rectangle = Rectangle { ... };>> That's it. Now it works. Thanks a lot for your help!
You're welcome!