atom-community / atom-script

:runner: Run ( scripts | selections | source ) in Atom
https://atom.io/packages/script
MIT License
731 stars 270 forks source link

Add support for C++ #212

Open keyndin opened 9 years ago

keyndin commented 9 years ago

Hi, is it possible to add C++ support to Atom Script?

erran-r7 commented 9 years ago

I have to recommend using the build package. Incidentally @caodingpeng surprised us the other day and added C, C++, Objective-C, and Objective-C++ support to Atom Script. The trade off is that these are only available for Mac users (with Xcode) and I ended up refactoring his changes to reflect that.

Which platform (Operating System) are you using? Is there a single command you could use to do this? This issue will likely be ignored since compiled languages should use a build tool and can't be run directly. Go is an exception to this (it provides go run). Mac OS X's xcrun command allows you to compile clang languages on the fly.

caodingpeng commented 9 years ago

I think add other platform support is easy, I will add other platform support when i have time

S-ed commented 9 years ago

What about clang for windows? It's pretty stable and devs are working on compatibility with MSVC. I'm not familiar with mac's xcrun, will it work?

rgbkrk commented 9 years ago

I'm not familiar with mac's xcrun, will it work?

No idea, I'm a Mac user that only uses gcc tooling. Try it, find out, and let the community know! :smile:

S-ed commented 9 years ago

To try it I need to purchase a mac, I've tried run mac os under VirtualBox and it was slo-o-ow.

rgbkrk commented 9 years ago

Oh, I thought you were saying xcrun on Windows for some reason. The current setup is already using xcrun: https://github.com/rgbkrk/atom-script/blob/6af49041a63d9220589e7d0afbdbbfce5a02a773/lib/grammars.coffee#L28-L38

S-ed commented 9 years ago

The problem is, xcrun running xcode tasks, not clang itself. That's why I've asked about compatibility.