-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cross-compilation from Linux to Windows #27
Comments
@CyuHat Thank you for the kind words and I'm glad I could help you on the journey of learning Nim! While I don't have any experience at all with cross-compiling from Linux to Windows, the issue seems that it may be from the procedure that finds chrome. To be a little more performant, it uses a 'when' statement (which is assessed at compiletime) to figure out which OS it's compiling to and uses that path. That may be the reason. I'm not exactly sure how Nim handles this internally when cross-compiling: Another guess is that it could be a window's security issue when running the application? Those would be my two guesses. Please let me know when you manage to figure this out |
@Niminem thank your for your fast and precise answer! I will check both hypotheses and come back to you if I find something. Meanwhile I have done some tests. I think that Neel manage to find the chrome browser in windows since it open a chrome window (text in french): The screen is the same as if I haven't added the |
Hi @Niminem # Copied from the filepicker.nim example - line 20
startApp(webDirPath = currentSourcePath.parentDir / "assets") After replacing it with a relative path, it worked under Windows too: startApp(webDirPath = "assets") Then, all I need is the assets folder alongside the executable. I apologise for the false issue and thank you for your valuable time! |
@CyuHat That's awesome, glad to hear everything is working as intended now! Remember, if you use |
Hi!
First of all, thank you so much for this amazing project! It has clearly encouraged me to start using Nim to create simple and shareable apps (still a beginner). Combining Nim's performance with a nice frontend in HTML/CSS/JS is a fantastic idea.
I have successfully created my first app on Linux, which works well. I am still figuring out how to bind C header files and shared libraries to the executable, but that's another subject. Now, I wanted to inquire if there is support for cross-compilation from Linux to Windows using Nim. According to the Nim Compiler User Guide, I tried to compile my app into a Windows executable using the following command:
This command successfully creates a
main.exe
binary. However, when I try to run it on Windows, I encounter a black screen with the following error message (translated from French):"This page does not work
Impossible to process this request via localhost at this time.
HTTP ERROR 500"
I have also attempted to compile the "filepicker" example, which works perfectly when compiled for Linux but encounters the same problem when compiled for Windows. Am I doing something wrong, or is cross-compilation not supported (yet)?
Thanks in advance
The text was updated successfully, but these errors were encountered: