Difficulties creating a static executable on Windows #1719
Replies: 4 comments
-
|
What was the output of I've only used jpm on Windows using VS build tools, not mingw, so I probably can't help much otherwise. I do need to use the 'Developer Command Prompt' to build, not sure if that applies to mingw. |
Beta Was this translation helpful? Give feedback.
-
|
Ok, I've removed the Makefile and bootstrap.c, and moved build.janet into the project dir. Now with Wow, Nevertheless, I further would have liked to include Puny GUI. But that seems to need me to clone and build iup, im-toolkit, SQLite, and who knows what (not yet looked at, what things are really needed), and then having to stitch together the whole build process of all involved libraries. So I'll take the opportunity, and in the meantime will learn some Rust to compile a standalone GUI binary. Now that the "hello world" build process runs, I always can come back and do some further tinkering. In case it wasn't apparent, I'd like to highlight that when trying to get the "hello world" to build, I was having trouble to find in the Janet and JPM docs information about how to setup things. E.g. I couldn't find documentation and samples for the |
Beta Was this translation helpful? Give feedback.
-
|
I was less confident in the differences between ldflags and lflags after looking at an old project of mine (which was also a module, not an exe) so I ran it by both claude and chatgpt and they gave exactly opposite answers 😂 LLMs don't do well with Janet, especially writing it. Best to ask on the Zulip chat The docs are definitely improving, but I believe mingw support is a fairly recent addition, and only a few people here have discussed static builds as there are some downsides. That said, there is a newer bundle/build system in the works, that you could tryout instead of jpm |
Beta Was this translation helpful? Give feedback.
-
|
For future readers...
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey all,
first, it's quite impressive what you pulled up with Janet. Me myself, I really love Clojure and its variants, and being able to use that to create a stand-alone binary to distribute it to non-developer colleagues or friends using Windows seemed a great idea. I also wanted to integrate GUI possibilities for small tools.
Now, I'm used to write some lines of host language code (Java) to bootstrap Clojure. But unfortunately with Janet, that bit turned out to be way too much ceremony in the end.
I recorded my tries to get a statically linked executable in my repo in the hope that it could be useful to improve JPM, which seemed to totally ignore my LDFLAGS and static linking wishes. Additionally I'll provide you with the discussion with Gemini, trying to get a working stand-alone
.exe. You can see that it's rather long-winded, but logically organized, and was quite a journey.I'm also willing to test out a few changes to JPM and the build process, if that helps. Though I have to admit, I'm not into the nitty-gritty details of linking, makefiles, and C in general, and didn't get deep into the JPM sources, but I know C99 and some of the backgrounds.
Cheers!
Beta Was this translation helpful? Give feedback.
All reactions