wiz-lang / wiz

A high-level assembly language for writing homebrew software and games on retro console platforms.
http://wiz-lang.org/
Other
409 stars 40 forks source link

Errors when building vfw nes sample #103

Closed est77 closed 3 years ago

est77 commented 3 years ago

vwf.wiz:387: error: const declaration with initializer must be inside an in statement vwf.wiz:388: error: const declaration with initializer must be inside an in statement

Bananattack commented 3 years ago

I couldn't repro this using the latest revision built from source and building the program using the build.bat included in the example folder.

image

What platform are you building with? Can you provide more context about the commandline used to trigger these errors? (Are you attempting to include this module in your own code?) Are you sure Wiz is up-to-date?

the vwf example only builds with recent master revisions of the source, it might not build if you are attempting to use an older version like the current tagged releases on github, or some older from-source installation that doesn't include the compiler changes it depends on.

est77 commented 3 years ago

I am using linux. I used the build shell script in the vwf directory. My version of wiz is up to date with the main branch on the repo.

Bananattack commented 3 years ago

Thanks, the context about the platform was helpful. Spotted the issue. build.bat was building main.wiz (which is the correct entry point). but the equivalent build bash script was incorrectly building vwf.wiz directly, which fails because it depends on being imported from within a program code bank. This would also fail to generate a working nes rom by itself even if it were to compile, because it's only part of the program.

Hopefully that works!

est77 commented 3 years ago

Yes, I can confirm that works.

Bananattack commented 3 years ago

Excellent! Closing the issue, thanks for the report!