Skip to content
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

Is building a Linux Executable through WSL CLI and Visual Studio 2022 supported? #26

Open
KeshavGuptaBentley opened this issue Jul 18, 2022 · 0 comments

Comments

@KeshavGuptaBentley
Copy link

I've been looking into your project and trying to build your CS_CPP_Interop example project.

Using the template, while I am able to build through the command line on linux/wsl to get linux executables, it breaks building through Visual Studio. I get one of 3 errors in visual studio:

  • Is your PATH and ENV variables correct? Command to run was g++ -fmax-errors=1000 -I "..\DynamicLib" -I "..\StaticLib" -DUNIX -D_DEBUG -D_CONSOLE -Wall -Wno-comment -Wno-parentheses -Wno-missing-braces -Wno-write-strings -Wno-unknown-pragmas -Wno-attributes -fpermissive -x c++ -g2 -gdwarf-2 -m64 -w -MM stdafx.cpp.
  • error MSB4057: The target "Build" does not exist in the project
  • Sequence contains no elements

Once I try to build through visual studio, it then breaks building through the command line causing both methods to fail after this.

I have also followed the steps outlined in your blog post here: https://medium.com/@roozbehid/c-c-net-core-cross-platform-cross-compiler-development-5abc0b8dd4cc but I get the same errors outlined above.

As a result, I have a few questions I'm hoping you can answer,

  • Is this project supported in Visual Studio 2022?
  • I want to use this template to build a linux executable for my C# and CPP interop solution both through visual studio and the linux command line. Is this functionality supported?
  • For the PATH or ENV variable error, is there something specific that the variable should point to? I haven't found any mention of how to configure the PATH/ENV variable.
  • Is this project still actively maintained?

I'm looking forward to your response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant