Closed axetroy closed 2 years ago
🤔 why the -os macos
flag? Are you cross compiling? Sorry I haven't got my mac setup currently
-os macos
is useless (if it's even valid) if you're compiling on the mac, and won't work at all on anything else (mac can cross-compile to others, but others can't cross-compile to mac... stupid Apple).
I found the -os flag in v help build-c
-os <os>, -target-os <os>
Change the target OS that V tries to compile for.
By default, the target OS is the host system.
When OS is `cross`, V will attempt to output cross-platform C code.
Here is a list of the operating systems, supported by V:
(CI tests runs on every commit/PR for each of these):
`windows`, `linux`, `macos`
In order to be consistent with other terminals, I will bring these parameters.
Even if this parameter is invalid, it does not affect it.
The keypoint is that $embed_file()
panic
Yes, it does appear to be valid, and no it won't have any effect, but... it should be ok to specify it.
And yes, there appears to be a problem with $embed_file
.
However, the error is that the file you're trying to embed doesn't exist. V should catch this and give a better error message, instead of letting C catch the error later. I don't know why the compilation doesn't fail, but running the compiled executable does - that should never happen.
No, the file is removed after compilation so the file should've been embedded in the binary and available inside the executable. I'm not sure what's up in this case.
Yep... getting a compilation error at runtime is very weird.
V version: V 0.2.4 77c18f4 OS: macOS
What did you do?
What did you expect to see?
What did you see instead?
runtime error