-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 compilation failed #4681
Comments
I also tried I tried to run the cmd as administrator and it still not working. |
@SirusDoma it looks like you are targeting .net framework 4.5 but compilation to native is only supported for coreclr. |
Thanks for your reply!
I still getting same error..
|
@SirusDoma do you have visual studio 2015 with c++ support that is a requirement if you want to compile it to native c++ ? if yes than that is the limit of my knowledge , a team member can help you out better. |
I have visual studio 2015 with C++ installed |
Please attempt the compilation from within VS 2015 X64 Native Tools command prompt. |
I tried it with VS 2015 X64 Native Tools command prompt
|
Native compilation is expected to work for HelloWorld scenarios. How did you generate the project.json you shared above? Could you please try the following steps:
Does this work for you? |
This is by design since that gets us access to the native compilation tools (cl and link).
CLI based projects start with "dotnet new". @richlander Are you aware of VS project system implying compatibility with .NET Core/CLI? The native binary will live under HW1\bin\Debug\dnxcore50\native. I think you are looking at contents of HW1\bin\Debug\dnxcore50. |
oops, it seems still not working, I was mistaken it is not only the warnings, but it also contains some errors. native folder contains nothing but HW.pdb
Note that, I did precisely what you told me before Any ideas? |
I believe I know what is happening. Can you try "dotnet compile --native --cpp -c Release"? |
I'm sorry for late reply
It's looking for Release folder. |
You missed a "-c" in the command. See my response earlier. |
oops, my bad, still not working
|
Just a suggestion for dotnet utility. There should be some options to show what exactly it is doing. What compiler options does it use, what paths, environment variables, are there any temporary batch files, etc. I am stuck with different issues at the moment and this lack of visibility is frustrating. |
@SirusDoma I do not see any errors there. Can you check if the native binary was produced? |
I've got it working following the steps above; the gotchas were
Lots of warnings as above about pdbs; would be nice if it said Both versions run; though don't work (for a complex app); but I assume that's because its early days. The
|
Closing as the documentation issue for the context is tracked in dotnet/cli#775 . Reopen if you hit this again. |
Allow projects to override implicit PackageReference items with item Include syntax
…711.3 (dotnet#4681) Microsoft.FSharp.Compiler From Version 10.10.0-beta.20329.5 -> To Version 10.10.0-beta.20361.3 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
I'm trying to compile the project with native compilation
However I got an error, here the console messages:
It's seems the compiler cannot find the header file (
stdint.h
) that included under the cppsdk...While the application code itself is only a simple hello world:
any ideas?
The text was updated successfully, but these errors were encountered: