bones-ai / odin-mnist-nn

A MNIST neural network written from scratch in Odin, visualised with Raylib
MIT License
155 stars 11 forks source link

Issue runing on Windows #3

Closed yussifm closed 1 hour ago

yussifm commented 1 hour ago

Am having issues running it on windows I created my own build.bat but I kept getting some unknown errors (am still trying out odin-lang for the first time).

.\build.bat speed && ./odin-mnist -nn Building for speed C:/Odin/base/runtime/entry_unix.odin(1:2) Syntax Error: Expected a package declaration at the beginning of the file

+private

     ^
    Suggestion: Add 'package runtime' to the top of the file

C:/Odin/base/runtime/entry_wasm.odin(1:2) Syntax Error: Expected a package declaration at the beginning of the file

+private

     ^
    Suggestion: Add 'package runtime' to the top of the file

C:/Odin/base/runtime/entry_windows.odin(1:2) Syntax Error: Expected a package declaration at the beginning of the file

+private

     ^
    Suggestion: Add 'package runtime' to the top of the file

C:/Odin/base/runtime/heap_allocator_other.odin(1:2) Syntax Error: Expected a package declaration at the beginning of the file

+build js, wasi, freestanding, essence

     ^
    Suggestion: Add 'package runtime' to the top of the file

C:/Odin/base/runtime/heap_allocator_unix.odin(1:2) Syntax Error: Expected a package declaration at the beginning of the file

+build linux, darwin, freebsd, openbsd, netbsd, haiku

     ^
    Suggestion: Add 'package runtime' to the top of the file

C:/Odin/base/runtime/internal.odin(1:2) Syntax Error: Expected a package declaration at the beginning of the file

+vet !cast

     ^
    Suggestion: Add 'package runtime' to the top of the file

C:/Odin/base/runtime/os_specific_bsd.odin(1:2) Syntax Error: Expected a package declaration at the beginning of the file

+build freebsd, openbsd, netbsd

     ^
    Suggestion: Add 'package runtime' to the top of the file

C:/Odin/base/runtime/os_specific_windows.odin(1:2) Syntax Error: Expected a package declaration at the beginning of the file

+build windows

     ^
    Suggestion: Add 'package runtime' to the top of the file

C:/Odin/base/runtime/procs_wasm.odin(1:2) Syntax Error: Expected a package declaration at the beginning of the file

+build wasm32, wasm64p32

     ^
    Suggestion: Add 'package runtime' to the top of the file

C:/Odin/base/runtime/procs_windows_amd64.odin(1:2) Syntax Error: Expected a package declaration at the beginning of the file

+private

     ^
    Suggestion: Add 'package runtime' to the top of the file

C:/Odin/base/runtime/wasm_allocator.odin(1:2) Syntax Error: Expected a package declaration at the beginning of the file

+build wasm32, wasm64p32

     ^
    Suggestion: Add 'package runtime' to the top of the file

C:/Odin/core/fmt/example.odin(1:2) Syntax Error: Expected a package declaration at the beginning of the file

+build ignore

     ^
    Suggestion: Add 'package fmt' to the top of the file

C:/Odin/core/fmt/fmt_os.odin(1:2) Syntax Error: Expected a package declaration at the beginning of the file

+build !freestanding

     ^
    Suggestion: Add 'package fmt' to the top of the file

C:/Odin/core/math/math_basic.odin(1:2) Syntax Error: Expected a package declaration at the beginning of the file

+build !js

     ^

C:/Odin/core/mem/mutex_allocator.odin(1:2) Syntax Error: Expected a package declaration at the beginning of the file

+build !freestanding, wasm32, wasm64p32

     ^
    Suggestion: Add 'package mem' to the top of the file

C:/Odin/core/mem/tracking_allocator.odin(1:2) Syntax Error: Expected a package declaration at the beginning of the file

+build !freestanding, wasm32, wasm64p32

     ^
    Suggestion: Add 'package mem' to the top of the file

C:/Odin/core/os/dir_unix.odin(1:2) Syntax Error: Expected a package declaration at the beginning of the file

+build darwin, linux, netbsd, freebsd, openbsd

     ^

C:/Odin/core/slice/sort_private.odin(1:2) Syntax Error: Expected a package declaration at the beginning of the file

+private

     ^
    Suggestion: Add 'package slice' to the top of the file

C:/Odin/core/sys/windows/advapi32.odin(1:2) Syntax Error: Expected a package declaration at the beginning of the file

+build windows

     ^

C:/Odin/core/sys/windows/bcrypt.odin(1:2) Syntax Error: Expected a package declaration at the beginning of the file

+build windows

     ^

C:/Odin/core/sys/windows/bluetooth.odin(1:2) Syntax Error: Expected a package declaration at the beginning of the file

+build windows

     ^

C:/Odin/core/sys/windows/comctl32.odin(1:2) Syntax Error: Expected a package declaration at the beginning of the file

+build windows

     ^

C:/Odin/core/sys/windows/comdlg32.odin(1:2) Syntax Error: Expected a package declaration at the beginning of the file

+build windows

     ^

C:/Odin/core/sys/windows/dnsapi.odin(1:2) Syntax Error: Expected a package declaration at the beginning of the file

+build windows

     ^

C:/Odin/core/sys/windows/window_messages.odin(1:2) Syntax Error: Expected a package declaration at the beginning of the file

+build windows

     ^

C:/Odin/core/sys/windows/winerror.odin(1:2) Syntax Error: Expected a package declaration at the beginning of the file

+build windows

     ^

C:/Odin/core/sys/windows/winmm.odin(1:2) Syntax Error: Expected a package declaration at the beginning of the file

+build windows

     ^

C:/Odin/core/sys/windows/winnls.odin(1:2) Syntax Error: Expected a package declaration at the beginning of the file

+build windows

     ^

C:/Odin/core/sys/windows/winver.odin(1:2) Syntax Error: Expected a package declaration at the beginning of the file

+build windows

     ^

C:/Odin/core/sys/windows/wow64_apiset.odin(1:2) Syntax Error: Expected a package declaration at the beginning of the file

+build windows

     ^

C:/Odin/core/sys/windows/ws2_32.odin(1:2) Syntax Error: Expected a package declaration at the beginning of the file

+build windows

     ^

C:/Odin/core/time/datetime/internal.odin(1:2) Syntax Error: Expected a package declaration at the beginning of the file

+private

     ^
    Suggestion: Add 'package datetime' to the top of the file

C:/Odin/core/time/time_other.odin(1:2) Syntax Error: Expected a package declaration at the beginning of the file

+private

     ^

C:/Odin/core/time/time_unix.odin(1:2) Syntax Error: Expected a package declaration at the beginning of the file

+private

     ^

C:/Odin/core/time/time_windows.odin(1:2) Syntax Error: Expected a package declaration at the beginning of the file

+private

     ^

C:/Odin/base/runtime/core.odin(21:1) Syntax Error: Expected a package declaration at the beginning of the file

+no-instrumentation

    ^
    Suggestion: Add 'package runtime' to the top of the file

'.' is not recognized as an internal or external command, operable program or batch file.

yussifm commented 1 hour ago

Got the build now working

yussifm commented 1 hour ago

But the executable window will just flash

yussifm commented 1 hour ago

all sorted