Hi guys,
Im trying to compile my nim code to a stand-alone executable. However, the executable I get run perfectly on the machine I just to compile the code, but doesn't run on any other computer. I'm also not getting any errors while running the executable. Its just shutting down within an instant. I'm using the following libaries:
import dimscord - import asyncdispatch - import options - import os - import strutils - import winim/lean - import winim/inc/lm - import httpclient - import system - import streams - import osproc
I have already tried many different flags while compiling but nothing seems to work. Could anyone help me? Thanks alot!
The first things that come to mind are OpenSSL (because Discord APIs use SSL), and PCRE (I'm not 100% sure, but I think dimscord uses re).
Try for example starting your app from the windows cmd, you might actually see the problem then. You can find those DLLs in the same folder with the Nim installation on Windows, or get them from nim-lang.org/download/dlls.zip - you need at least cacert, libcrypto, libssl, PCRE, depending on if you're compiling for 64-bit you need to choose the relevant versions.
Try compiling with --app:gui. If you have DLL errors it will show up as a dialog box instead of popping in an command line which might vanish very fast if you launch from explorer.
I took a look at your deps and I would concur with @Yardanico, however, looking at the deps for dimscord, I would say the dependency on libsodium is another likely suspect.