Skip to content

Why the -file build option? #2393

Answered by Kelimion
programandala-net asked this question in Q&A
Discussion options

You must be logged in to vote

This is kind of answered when you use odin help build. Essentially, before -file, beginners would have dir\a.odin and dir\b.odin, build one of them and then complain that they didn't see declarations from the other file, despite telling Odin to build a single-file package.

It happened so many times we made it a dedicated option to make you think about the implication of building a single file.

>odin help build
odin is a tool for managing Odin source code
Usage:
        odin build [arguments]

        build   Compile directory of .odin files as an executable.
                One must contain the program's entry point, all must be in the same package.
                Use `-file` to build a …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Kelimion
Comment options

@programandala-net
Comment options

Answer selected by Kelimion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants