-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[native-image] HelloWorld fails to build on Windows #948
Comments
Please have a look at #946 (comment) If after carefully following the instructions provided there you still fail to build a simple HelloWorld image on Windows feel free to reopen this issue. |
I think legacy_stdio_definitions.lib needs to be added to the list of libraries in https://github.com/oracle/graal/blob/master/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/image/NativeBootImageViaCC.java |
@pquiring interesting. If we add that would that allow us to work with later SDKs OOTB? |
Also found one more missing import (__imp___iob_func) which is easy to generate. Create this file called stdio.cpp
Steps to follow: Works for me! |
Only downside is that generated project now requires stdio.dll but it works with latest SDK. |
To use latest SDK OOTB would requires adding legacy_stdio_definitions.lib to the list of LIB files and also compiling the substrateVM against latest SDK to use the newer stdio names (that is what the __iob_func stuff is). |
When I try to build the HelloWorld class using native-image on windows, I get this error:
EDIT: After debugging the input stream and output stream of the "cl.exe", I've got the following result:
Looks like native-image has failed to parse the line
LINK : fatal error LNK1104: cannot open file 'LIBCMT.lib'
in the input stream as error line.By applying this patch, the actual error is properly being displayed:
Ok, after dealing with missing includes and libs, I've managed to get further into the native-image build, just to be greeted by this error:
The text was updated successfully, but these errors were encountered: