odin-lang / Odin

Odin Programming Language
https://odin-lang.org
BSD 3-Clause "New" or "Revised" License
6.55k stars 570 forks source link

'odin build <file>' does not produce an executable with the correct name #245

Closed Tetralux closed 5 years ago

Tetralux commented 6 years ago

On Windows 10 x64, commit https://github.com/odin-lang/Odin/commit/ec84188597b6558970e66ec7918851f1267888df:


> type hello.odin
package hello

using import "core:fmt";

main :: proc() {
    println("Hello, World!");
}

> odin run hello.odin
Hello, World!

> odin build hello.odin

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

> main
Hello, World!
hazeycode commented 5 years ago

I started looking at this as a way of an introduction to the code base #274 specifically this commit https://github.com/odin-lang/Odin/pull/274/commits/ae02e9c34aa08b642fd6ca5465f988f8f1d98c60 Would be interesting to see if you get the same Makefile issue on Windows (as described in the PR)

hasenj commented 5 years ago

Use the -out parameter.

$ odin build something.odin -out=./something.exe
Tetralux commented 5 years ago

I think this was fixed with ae02e9c34aa08b642fd6ca5465f988f8f1d98c60.