How to build windows exe ?
How to build window exe ? , And how to develop a simple hello world gui ?
25 Replies
1. I don't think it's possible to build an exe just yet
2. what do you mean hello world gui? do you mean a simple hello world program, or do you mean a bare bones window?
It may not build an exe now because it doesn't support now.
You will be able to do it like this, however you would need the microsoft toolchain
To make a gui you would need to use X11 which I don't think is being linked currently, and you can't pass custom linker flags
Thank you all for reply , but is that mean that i have to wait for newer versions or is there a way with a more steps to go through to develop a basic windows desktop app ?
It means you have to wait, this is still very early for Mojo.
Most languages you might know were released years, often decades in the past, meanwhile mojo a few days ago :)
But I don't think it will take too long
I know but you know the one feeling very enthusiastic to start developing from day 0, but any way thank you 🙂
Yeah, for now people are still experimenting with implementing basic data structures like arrays. GUI applications have to wait a bit
but then what will be the uses for the mojo build command ?
i mean in this version ?
you mean the
target
command?
the mojo build command works, it's just that you're limited to Linux right now
They are working on mac and windows support still, but I would expect windows to come a bit later as it's very different from Linux and macOS.Well as you said we will have to wait
@TeamPuzel one more question if you please , i tried installing gcc-mingw-w64 will it help in any way ? , when trying the exe in windows it gives me this error " is not compatible with the v
ersion of Windows you're running. Check your computer's system information and t
hen contact the software publisher. "
I don't understand, you were able to compile with
--target-triple x86_64-pc-win32
??i used this line " mojo build testmojo.mojo --target-triple x86_64-w64-mingw32 -o testmojo.exe
and what did you get? an exe?
I'm pretty sure if you force it to name it exe it will even if it isn't
" -o testmojo.exe " i named it testmojo.exe and it gave me testmojo.exe but in windows it give me the version error ?!
don't use
-o
will it still make an "exe"?it export with no exe
yeah
you could put
-o testmojo.anything
it's not that smart
you decide the name if you use o
so using gcc-mingw-w64 won't help right ?!
Congrats @Osama-Logic, you just advanced to level 2!
I think this might be a bit broken
I do not know unfortunately.
Well thank you for your help 🙂
Please If you found any info on the matter please let me know
sure!
run GUI? , I think just use mojo->Python. Develop full stack to replace Python is not the main goal for now . IMO.
@Osama-Logic I think you must set --target-triple to x86_64-pc-win32 instead of x86_64-w64-mingw32, in fact you can set "x86_64-w64-mingw", "x86_64-w64-ming" etc, it will compile and for what i can see is mojo will fallback to default (linux) if --target-triple cannot be found
Thank you for your message but i think i will wait unitl native windows installer is out i think then i will be able to build for windows