11 ms·
Visual C++ for Linux Development
- tdicola 11y agoI'm curious is it using MSBuild as the build system on a Linux machine, or does it integrate with existing makefile, CMake, autotools, etc. style projects? It seems like a total nonstarter to expect Linux developers to switch to MSBuild.
- giancarlostoro 11y agoI think it builds it on the system since they have you install g++ and gdb probably for debugging. That's the impression I get, not entirely sure though. So it probably transfers your code via SSH and then runs it.
- tdicola 11y agoIt's not super clear but I think that step is actually installing g++, etc. on the Linux host (and in reality they probably mean you should apt-get install build-essential and not just g++, gdb, etc. individually). It's having you install openssh-server which wouldn't really make sense on the client/development PC. Also for ARM you'd need a gcc cross compiler installed and I didn't see any mention of that.
- iontodirel 11y agothe ssh server is indeed for the remote machine/Linux only, we are working on a prerequisites check with possible automatic acquisition of those tools on Linux if you do not have them installed; ARM on x86 or x64 and x86 on x64 it's not a sscenario we currently support, but x86 on x64 would be the first thing we look at
- robotdad 11y agoThe dependencies mentioned are for the remote Linux machine you connect to from VS. We use ssh from within VS to copy files across and issue the compilation commands with gcc. There isn't any cross compilation right now even for ARM. Most of our testing here has been on Raspberry Pis.
- giancarlostoro 11y agoI meant exactly what you said, they install the compiler and tool set on the Linux host, the Windows end just SSH's into it and sends the code / commands. That is my speculation at least.
- robotdad 11y agoThat's it exactly
- deleted 11y ago[deleted]
- tomyws 11y agoIt wasn't clear to me either. Unfortunately, the extension seems to have a dependency on the Android NDK which I don't plan to install: Today we do have a dependency on the Android Tools for Visual Studio
- tdicola 11y agoOh weird, huh this must be more fallout from the canceling of Astoria that they're spinning off into a standalone thing.
- robotdad 11y agoThe NDK dependency is actually to get the MIEngine that provides the machine interface to hook up GDB with the VS debugger. We're looking at making the MIEngine a separate component so the Android, iOS and Linux tools don't have a dependency on each other.
- voltagex_ 11y agoHad to boot Linux to expand my NTFS partition to have enough space to install it all - hoping it's something for Update 3 or before.
- robotdad 11y agoWe are using msbuild to drive running the compile on the remote Linux machine. Today that is being emitted as straight commands for gcc on Linux. We're interested in what we should do around make, cmake, etc. This is just a start.
- zaphar 11y agoPlease tell me that msbuild has a replacement in the wings? Something capable of hermetic reproducible builds. PLEASE???
- apaprocki 11y agoI'd highly recommend contributing back "build features" to projects like cmake if it doesn't already exist so that you can simply enable a feature rather than hard-coding gcc-specific flags. Even something like clang takes a little work to shoehorn into a project that is enabling many gcc specific features. Abstracting the feature out means compiler front-ends don't have to mimic gcc to have a chance of working, and even allows more easily adapting to other POSIX platforms where gcc/clang are not the default compilers. E.g. if cmake doesn't support a robust enough way to specify LTO the way you need to in a project, consider helping add it. (Just picked some random feature)
- robotdad 11y agoGood point, if needed I'm sure we will.
- chris_wot 11y agoOK, I'll be considering using this for LibreOffice development. Microsoft finally got their mojo back? They are getting amazing.
- robotdad 11y agoI'm on this team, and wrote the post. I'd love to hear how this works out for you. And yes, it's all mojo all the time around here these days. :)
- chris_wot 11y agoI'll have to dust off my Windows laptop - good on you guys :-) Even if we are competing against your Office suite!
- swah 11y agoWhats the mentality here? "If Linux is just an app you run on Windows, we can become relevant again to all those people"?
- robotdad 11y agoThere are a lot of people in the world that do cross platform development so we're improving our tooling story for them. Well, I hope we are. It's also important to us to have a good IoT development story, and any thing that can run Linux will run Linux.
- PostThisTooFast 11y agoOK, this seems pretty cool. I hope Microsoft has fixed a few of these things though: http://goldmanosi.blogspot.com/2012/05/visual-studio-is-it-getting-worse-as.html http://goldmanosi.blogspot.com/2012/05/visual-studio-is-it-g...
- sickbeard 11y agoposted in 2012. have you even tried the latest visual studio?
- jra101 11y agoWorks pretty well, had a minimal X11 + GL app up and running in minutes. Issue 1: Visual Studio doesn't pull header files from the target Linux system so Intellisense was useless. Issue 2: Every time I compiled something or started a debug session, four new sshd processes and a new sftp-server process would start on the target Linux system (Ubuntu 14.04 running in a VM). Eventually I had 16-20 of these processes running and they never exit.
- iontodirel 11y ago1) this is something we're planning on making much better with automatic acquisition of the headers from the remote for IntelliSense 2) I think this might be a cleanup issue, I will fix this
- kchoudhu 11y agoAny plans to use your new linuxulator to locally deploy and develop linux binaries?
- colemickens 11y agoWhy are they spinning up new sshd instances? That makes me raise an eyebrow.
- barrkel 11y agosshd forks per connection.
- nwatson 11y agoThe 'sshd' process on the target Linux apparently forks a process to handle each connection . . . with two SSH sessions the Linux target looks like this (pstree -p): |-sshd(1017)-+-sshd(5495)---sshd(5561)---bash(5562) | `-sshd(5595)---sshd(5631)---bash(5632) When the ssh sessions die, only process 1017 is left.
- saboot 11y agoHow exactly does the x11 part work. If I'm working remotely and have XServer running on windows, will it show the program when I hit run? Or do I need to be logged in through a terminal session separately running the executables through that?
- marshray 11y agoWill the new VS Linux development stuff work for the newly announced "Linux ABI for Windows" too? [disclosure: MSFT]
- robotdad 11y agoWe're aware of that work of course but haven't tried anything with it yet. We were really focused on the remote compile. Since we only support remote right now to try it you’d have to setup an ssh connection to yourself. Hmmm... Anyway, I'm very interested in how can we leverage Linux tools locally on Windows as part of this.
- PeCaN 11y agoYeah, I want to develop for WSL from Visual C++ on Linux running under WSL. ...What a time to be alive. Did hell freeze over or something?
- laveur 11y agoI have to say this is awesome. Not gonna make me jump ship from Mac but I love that MSFT is finally making steps towards being very open source friendly.
- ausjke 11y agoare you sure about this? MS has never been friendly to open source, the recent crazy moves from its side may just be a Troy thing, sorry I just could not trust M$ as history is the best teacher. I feel MS is forcefully getting into OSS ground and may damage the freedom we have enjoyed. Anyway I have no interests in anything it's doing. No trust, no anything. I just hope it will not use patent or something it is trying to leverage now to sue anyone it wants later, after all it has deep pockets and it is never an ethical company per se.
- jblow 11y agoAnyone who downvotes replies like this is displaying ignorance of Microsoft's pattern of behavior through their entire history. Sure, maybe it's different this time ... But usually it isn't.
- jsmeaton 11y agohttp://www.hanselman.com/blog/MicrosoftKilledMyPappy.aspx http://www.hanselman.com/blog/MicrosoftKilledMyPappy.aspx Seriously, when was the last time Microsoft employed EEE? People have been saying "maybe it's different this time.." for years. I'm getting sick of seeing the "EEE" meme every time Microsoft does something.
- simoncion 11y agoIt seems like this reply would be more appropriate when attached to BoysenberryPi's comment. 1) There's much more to Microsoft's historical bad behavior than EEE. 2) Noone in this sub-thread invoked EEE. :)
- 11y ago
- wyldfire 11y ago> Today we only support building remotely on the Linux target machine. That's not quite what I suspected this meant. Buuuut, still -- good for you, Microsoft. These are the kinds of changes you need in order to attract developers.
- robotdad 11y agoI've been puzzling over this all night. I think I finally got your meaning. I have an IoT focus so "target" doesn't have a negative connotation to me. :)
- wyldfire 11y agoWell, it's not necessarily negative, but the scope of the feature delivered is much smaller if what the team says they've done is integrated ssh/scp/gdb into VC++. When I read the headline after having read the bit about native linux binaries, I thought "wowsers MS went full linux support!" Still, it's an excellent achievement and it seems clear that they wanted to announce this at the same time. They right-sized the scope of the VC++ work to match what could be accomplished in the time allowed. I would be thrilled if Microsoft's next move would be to transition to an LLVM/clang based engine underneath VC++. IMO their distinguishing feature for VC++ is not the compiler engine. This would be the kind of lean maneuver that they're trying to steer towards these days.
- robotdad 11y agoSorry, never meant to mislead that VS was on Linux. Is this the sort of thing you are looking for with respect to clang? https://blogs.msdn.microsoft.com/vcblog/2016/01/20/clang-with-microsoft-codegen-january-2016-released/ https://blogs.msdn.microsoft.com/vcblog/2016/01/20/clang-wit... We don't have clang support for Linux yet, something we are looking at. Lots to do. :)
- mixmastamyk 11y agoIt's nice to see MS competing again. Too bad the other hand is doubling-down on the spying.
- JL2010 11y agoFor me, the full-measure solution would be to provide a native port of Visual Studio for Linux. I understand that this is not practical on many, many levels, but if Microsoft were to ever take on that herculean effort they would win me over in terms of my choice for dev tools under Linux. For now I'll have my Windows stuff in Windows and my Linux stuff in my Linux partition. I do look forward to checking out the linux-in-windows (dynamic syscall translation) feature soon though.
- TwoBit 11y agoThat would involve a full ground-up Visual Studio rewrite. It's not going to happen.
- umanwizard 11y agoNot necessarily. Getting it to work with Wine is probably easier. I've spent many hours running Publisher in CrossOver Office and never ran into any problems, so this sort of thing is certainly possible for complex apps.
- SiVal 11y agoNo, but Visual Studio Code is off to a very good start, and it runs well on Windows, Mac, and Linux, all free and open source. It's not a "rewrite" per se, but a new product with the same name but targeted at developers on all platforms. They are talking about adding enough serious IDE power over time (and the original VS shows that they know what it takes) that they could become a serious power in the open, cross-platform dev world. They would not need to port all the Windows-specific functionality that has accreted on Visual Studio over the years to become the "new Visual Studio" for developers on all platforms.
- robotdad 11y agoWe released an C/C++ extension for VS Code today as well. https://blogs.msdn.microsoft.com/vcblog/2016/03/31/cc-extension-for-visual-studio-code/ https://blogs.msdn.microsoft.com/vcblog/2016/03/31/cc-extens...
- incepted 11y agoI'm barely picking up the pieces of my blown mind from the "bash running on a Linux image inside Windows" announcement and now... this? Are you trying to kill me, Microsoft?
- frozenport 11y agoKinda already exists: http://visualgdb.com/toolchains/embedded http://visualgdb.com/toolchains/embedded just use the existing x86 target. You're really just using MSVC as a fancy text editor.
- omgtehlion 11y agoNot only editor. VS has extensive debugging facilities. You only need to write glue code between VS and GDB like "VS asks what's inside variable X", or "GDB hit breakpoint, here's the stack trace". Source: I have written a Nodejs debugger for VS before MS released their NodeTools to the public. If you have a couple of such great tools (VS+v8 or VS+GDB) it is just a matter of time before someone brings them together.
- ivanceras 11y agoDoes this mean, Games developers can now recompile their games for linux?
- amd_ 11y agoNot if they target Windows only libraries, ie DirectX. It would probably be about as much effort as it is today -- only their compile/deploy is more streamline if I understand the post correctly.
- simpsond 11y agoI really hope windows runs on linux some day. I've always liked the windows shell. This might seem out of place on this post, but I get the sense that MS is putting more effort into linux.
- known 11y agoFinally... Hope MS will also port Office to Linux;
- krylon 11y agoMmmh. I use MS Office at work because I have to, but I really don't like it. Office 2013 has given me more headaches than 2003, 2007 and 2010 combined. So personally, I hope they don't. Of course, if MS Office was available on Linux, converting regular users would be so much easier... But for the time being, I don't see it happening. It would probably be a lot of work, and the demand probably is not there. Last time I saw any numbers, desktop machines in western Europe ran about 90% Windows, 7-8% OS X, and ~1.5% Linux. So unless porting Office to Linux happens to be trivial (which I doubt), it is not worth the effort at this time. (OTOH, they did port it to iOS and Android, so it cannot be impossible, either.)
- amq 11y agoI'm using CLion + Cygwin for this now. Works nicely, even gdb, without remote machines. http://stackoverflow.com/questions/33267305/how-to-setup-clion-for-compile-and-run http://stackoverflow.com/questions/33267305/how-to-setup-cli...
- omgtehlion 11y agoBeen using visualgdb for this. Intellisense, debugging and all other stuff. Works both for desktop linux and cross-compiling for embedded devices. Hope those guys don't go out of business... They were really helpful
- deleted 11y ago[deleted]
- fit2rule 11y agoNice power-play for the IoT market, especially considering that Microsoft is very much an also-ran at this moment, vis a vis shipping actual Microsoft-licensed code in user binaries in IoT-class devices .. However, this will not lure me away from PlatformIO and SublimeText, which are perfectly cromulate IoT developer tools ..
- robotdad 11y agoI love platformio too. We have another extension that can be used with platformio. This isn't really documented yet, something I'll be fixing next month. https://visualstudiogallery.msdn.microsoft.com/35dbae07-8c1a-4f9d-94b7-bac16cad9c01 https://visualstudiogallery.msdn.microsoft.com/35dbae07-8c1a...
- fit2rule 11y agoHrmm, now I'm starting to feel a bit courted here, but alas .. no .. I just will never turn to Microsoft for tooling in the IoT/embedded space. There is far too much 'bad aji', if you know what that is .. in the way that Microsoft is handling all of this. You are proving a bitter point, for those of us who have been watching for 30 or so years, which is this: Microsoft is still up to its old tricks. So, no thanks..
- deaddodo 11y agoI was hoping this was an extension for VS:Code. Love the IDE and the clang extension is decent....but real support would be pretty sweet.
- robotdad 11y agoHope no more, you can have it. https://blogs.msdn.microsoft.com/vcblog/2016/03/31/cc-extension-for-visual-studio-code/ https://blogs.msdn.microsoft.com/vcblog/2016/03/31/cc-extens...
- joe563323 11y agoWhy? Please.. Microsoft is dying. Do not disturb.
- exabrial 11y agoLame, April Fools isn't till tomorrow. Wait, for real?
- YaroslavGorin 11y agoIs it possible to ignore the error "The remote project directory '<some/path>' is set to a system directory. This can cause harmful behavior and is not allowed." ?