Open BluBloos opened 1 month ago
Two things:
c3c compile project
it is actually saying "compile all the source files in the 'project' folder'. Use c3c build
instead.build
folder is intended for intermediate build artifacts.Thanks for the response!
I misunderstood the purpose of the build folder because I skimmed https://c3-lang.org/guide/my-first-project/ and assumed the build folder is not only where intermediate build artifacts go but all artifacts.
As a first-time user, I think it's confusing that there are two commands compile
and build
. If I were to suggest a change, it would be to have just one command compile
. The compile command would build all source files in a folder unless it recognizes that the folder is a project, in which case it builds the project. That being said, maybe this is another case of my lack of understanding for why there are two commands.
They act quite differently. build
takes a single "target" argument, which is what target in the project.json file one wishes to compile for, e.g. c3c build mygame-testversion
, whereas compile
is to just straight go and compile individual files, without a project, e.g. c3c compile foo.c3 bar.c3 baz.c3
There is also compile-run
(compile files and run them), and run
(build the target and run it)
Can I close this?
I downloaded and unzipped to get a folder containing c3c.exe. I navigated cmd.exe to the folder. I ran:
c3c init project
. I ran:c3c compile project
. main.exe was created in the same folder level as c3c.exe, whereas I expected main.exe to be created within thebuild
folder belonging to the project.