Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
The community reviewed whether to reopen this question 1 year ago and left it closed:
Original close reason(s) were not resolved
Improve this question
What languages can be compiled to WebAssembly (Wasm)?
I believe right now C, C++, and Rust (experimental) can be compiled to WebAssembly, with the llvm compiler backend, with languages like Java, Swift, and C# not currently being supported, but being possible candidates for future development.
I don't believe JavaScript can be compiled to Wasm.
https://github.com/WebAssembly/design/issues/219
WebAssembly support is ever evolving. Right now it is supported by the following languages:
C / C++ - has very good (production ready) support via EmScripten, or other minimal LLVM-based toolchains
Rust - WebAssembly is an officially supported target, with a highly active community around it.
Go - has now supports WebAssembly as an official, yet experimental, target
C# - has experimental support via Blazor, however this currently requires embedding a .NET runtime into Wasm. Blazor was officially adopted by Microsoft as an experimental technology, with a recent preview release.
D - the "betterC" subset of D can be compiled to WebAssembly through LDC (LLVM compiler).
TypeScript - via AssemblyScript, highly experimental, but gaining momentum.
Java - via TeaVM or Bytecoder
Haxe - just announced support
Kotlin - Kotlin/Native 0.4 gained experimental support of WebAssembly and via TeaVM
Python - Pyodide is a port of Python to WebAssembly that includes the core packages of the scientific Python stack (Numpy, Pandas, matplotlib).
PHP - Experimental, but with a working prototype
Perl - WebPerl is a port of the Perl binary to WebAssembly, allowing you to run Perl scripts on the web.
Scala - using the Emscripten compiler, and TeaVM
Ruby - via the run.rb project
Swift - using SwiftWasm
There are commercial solutions also:
RemObjects - Which has announced support for C#, Java, Swift and Oxygene
Regarding JavaScript, it is unlikely to gain support as WebAssembly is a statically typed assembly language.
There are also various more obscure / hobbyist languages that support WebAssembly. Further details can be found on the more exhaustive Awesome WebAssembly Languages list.
See https://github.com/mbasso/awesome-wasm#compilers -- for now it's only C/C++, others are experimental, but amount of the "experimental" part grows.
Currently WebAssembly supports just flat linear memory. That's suitable for C/C++/Rust and a lot of other languages, but most popular modern languages need garbage collector to run. That's "post-MVP feature" of WebAssembly (see https://github.com/WebAssembly/design/issues/1079). For now the only option is to implement garbage collector inside the wasm with some custom code.
This repo
Contains a list of languages that currently compile to or have their VMs in WebAssembly(wasm)
Features:
Uses emojis to show how mature each language is currently
Provides links to each languages project names and options
TeaVM can be used to transpile JVM bytecode to WebAssembly. You can checkout the project homepage at https://github.com/konsoletyper/teavm.
TeaVM at its core can transpile JVM bytecode to JS and WebAssembly. WebAssembly support is in an early stage, but there are demos available to compare performance of a simple JBox2D simulation with GWT, TeaVM(JS output) and TeaVM(WASM output), which are quite impressive.
Please note that WebAssembly currently has no direct access to the DOM or other JavaScript APIs. Also in the current MVP there is no support for opaque datatypes or even the GC. However, it is possible to do up/downcalls from JS to WASM and back again using some JS trickery, as seen in the mentioned demos.
Related
I know many people are using Rust and a few other languages to experiment with WebAssembly.
And I know that people using WebAssembly with C/C++ are mostly using Clang/LLVM.
But I can't seem to find any information at all on whether MSVC can compile C/C++ to wasm binaries, whether there's any kind of beta or developer preview, or whether it's on a future roadmap or feature request, etc.
I know Edge supports wasm and Microsoft is listed as one of WebAssembly's developers on the wasm Wikipedia page.
But what about generating wasm from MSVC? Any info on that?
C++ now supports WebAssembly using some toolchains like llvm/emscripten, but VC++ does not support it currently. The good news is that VC++ developers have noticed this:
We will do some preliminary checks to make sure we can proceed further. (2018/12/14)
For more information, you can check out these links: Targeting WebAssembly with C++ in Visual Studio IDE? and https://developercommunity.visualstudio.com/idea/457758/add-emscriptenwebassembly-support.html
What are the programming languages supported by Meego ? Where Can I get any sample library built in meego for some basic analysis in ubuntu environment...
I am going to test libraries built in meego...I am trying to analyse the type of libraries I may be getting..
The preferred library for Meego will be Qt. Qt applications can be written in many languages, but the preferred language is C++. Python bindings will probably be available.
Security Tools
C++ - see http://qt.nokia.com/products/platform/meego/
Can I do Android programming in C++, C? If the answer is "yes" then please tell how? And what's the procedure to set up?
I don't know Obj-C, Java, but well-versed in C, C++, Flash AS3, SDK released by Google.
Please do not tell about NVDIA SDK it's not fully developed :)
PLEASE NOTE: THE ANSWER BELOW IS HORRIBLY OUTDATED, AND MIGHT NOT BE ENTIRELY CORRECT ANYMORE.
You can program in C/C++ using the Android NDK. You'll have to wrap your c++ codebase in a static library and load that through a Java wrapper & JNI.
The standard NDK does not support RTTI and a lot of the functionality of standard c++ is also not available such as std::string, etc. To solve this you can recompile the NDK. Dmitry Moskalchuk supplies a modified version of the NDK that supports this at http://www.crystax.net/android/ndk-r3.php. This modified version works on all Android phones that run on an ARM processor.
Depending on the kind of application you should decide to use Java or C/C++. I'd use C/C++ for anything that requires above average computational power and games -- Java for the rest.
Just pick one language and write the majority of your application in that language; JNI calls can decrease your performance by a lot. Java isn't that hard though -- if you know how to program in C/C++. The advantage of Java is that the application can run on any device running Android, where as NDK applications depend on the architecture it was compiled for.
You should use Android NDK to develop performance-critical portions of your apps in native code. See Android NDK.
Anyway i don't think it is the right way to develop an entire application.
Yes, you can program Android apps in C++ (for the most part), using the Native Development Kit (NDK), although Java is the primary/preferred language for programming Android, and your C++ code will likely have to interface with Java components, and you'll likely need to read and understand the documentation for Java components, as well. Therefore, I'd advise you to use Java unless you have some existing C++ code base that you need to port and that isn't practical to rewrite in Java.
Java is very similar to C++, I don't think you will have any problems picking it up... going from C++ to Java is incredibly easy; going from Java to C++ is a little more difficult, though not terrible. Java for C++ Programmers does a pretty good job at explaining the differences. Writing your Android code in Java will be more idiomatic and will also make the development process easier for you (as the tooling for the Java Android SDK is significantly better than the corresponding NDK tooling)
In terms of setup, Google provides the Android Studio IDE for both Java and C++ Android development (with Gradle as the build system), but you are free to use whatever IDE or build system you want so long as, under the hood, you are using the Android SDK / NDK to produce the final outputs.
You should look at MoSync too, MoSync gives you standard C/C++, easy-to-use well-documented APIs, and a full-featured Eclipse-based IDE. Its now a open sourced IDE still pretty cool but not maintained anymore.
You can take a look also at C++ Builder XE6, and XE7 supports android in c++ code, and with Firemonkey library.
http://www.embarcadero.com/products/cbuilder
Pretty easy way to start, and native code. But the binaries have a big size.
You can use the Android NDK, but answers should note that the Android NDK app is not free to use and there's no clear open source route to programming Android on Android in an increasingly Android-driven market that began as open source, with Android developer support or the extensiveness of the NDK app, meaning you're looking at abandoning Android as any kind of first steps programming platform without payments.
Note: I consider subscription requests as payments under duress and this is a freemium context which continues to go undefeated by the open source community.
There is more than one library for working in C++ in Android programming:
C++ - qt (A Nokia product, also available as LGPL)
C++ - Wxwidget (Available as GPL)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
It needs to have good code completion support, debugger, and a nice way to browse code (click to go to documentation).
Since I got spoiled by Java IDEs (Eclipse), it would be cool if it supported refactoring, reference search and some form of on the fly compilation, but maybe I'm asking too much.
So far I tried Eclipse C++ plugin, Qt Creator and Code Blocks. Eclipse plugin feels sluggish, Code Blocks has much worse completion then Qt Creator and Qt Creator is great for Qt stuff, but kinda hard to use for free form projects.
What are other options and first hand experience with them, since trying something for few hours and using something on a daily basis are two different things?
I have been using Code Lite for some time now. It provides support for auto completion. It has a code explorer and outline, though I find myself using "find resource" to open files. It has a plugin for UnitTest++ and some primitive refactoring capabilities.
link text
I'm very happy with Eclipse. It's not fast, but if you get a good enough workstation, it runs just fine, and considering how much your time is worth, a good workstation is actually pretty cheap. It also has a feature list a mile long (good features, not just bullet points), which I tried to summarize in this answer. It's also being actively developed; CDT 5.0 is a huge improvement over 4.0, and the next version (due out this month) adds even more nifty features (like syntax highlighting that can distinguish between overloaded and non-overloaded operators).
With some tweaking, you can turn VIM into a very good IDE. You can enable tabs for multiple source files in a single buffer, code navigation, and even auto-completion. The example below is for python, but the ideas apply to C++ as well.
http://arstechnica.com/open-source/guides/2009/05/vim-made-easy-how-to-get-your-favorite-ide-features-in-vim.ars
Use EMACS. M + / gives you all possible completion from the opened buffers. It has got nice integration with GDB as well.
I use plan9port's Acme. It only does a few things itself, but provides a very good interface to let any command-line program process any text from any of the tiled windows. So, instead of building all functionality into the editor (eg Emacs), it outsources just about all of it to command-line programs---actually more numerous and written in languages better suited to the tasks at hand than the editor's language (even Lisp).
http://www.faqs.org/docs/artu/ch13s02.html is "A Tale of Five Editors" (read Wily as Acme), from The Art of Unix Programming by Eric S. Raymond.
QTCreator rawks and has a great set of libs that are also cross platform.
recently I did some research for a good C++ Crossplatform IDE:
* Eclipse Galileo with CDT Plugin
* NetBeans 6.7 (which is also the base for the SunStudio IDE)
* CodeBlocks 8.02
* CodeLite 2.x
After all I have decided to use CodeLite 2.x.
Please see this permalink for a Summary: ide discussion
I'm a fan of 'Code::Blocks'
Code::Blocks is a free C++ IDE built to meet the most demanding needs of
its users. It is designed to be very
extensible and fully configurable.
Finally, an IDE with all the features
you need, having a consistent look,
feel and operation across platforms. - (the site)
Their latest release has been amazing... For a while it was difficult to get it since they only had the RC on their main site. Now that it's been released proper (not just dev snapshots), its much easier to get.
built in Astyle, code completion, and multi-compiler support, all cross platform w/ wxwidgets.
Anjuta might have Windows port:
http://en.wikipedia.org/wiki/Anjuta
You can use the Ultimate++ framework It is a C++ cross platform framework with a great IDE you can develop visual UI applications
please visit http://www.ultimatepp.org
SlickEdit is quite good and available for most platforms.
I've recently discovered NetBeans for C++. In the past C++ support in NetBeans has been lacking, but the 6.5 version has improved greatly. If you setup your project following guidelines on the NetBeans site, then code completion and debugging work well in Linux with g++ & gdb. I've not tried using NetBeans for C++ on Windows, but I don't think there would be an issue using DevC++, Ming or cygwin with g++ for compilation.
NEdit along with this package:
http://code.google.com/p/nedit-macro-kit/
It's cross platform, cross language and customization-friendly.
I'm currently giving Geany a try on gnu/linux, and so far I'm loving it! :]
I would otherwise be using Netbeans for C++, but there seems to be a few nasty bugs with their most recent release. Geany gets the job done, at least for now.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I'm looking for a tool which can generate a Makefile for a C/C++ project for different compilers (GCC, Microsoft Visual C++, C++Builder, etc.) and different platforms (Windows, Linux, and Mac).
Other suggestions you may want to consider:
Scons is a cross-platform, cross-compiler build library, uses Python scripting for the build systems. Used in a variety of large projects, and performs very well.
If you're using Qt, QMake is a nice build system too.
CMake is also pretty sweet.
Finally, if all else fails...
Try Automatic Makefile Generator.
It has support for the following compilers:
Borland 3.1
Borland 5.0
Borland 5.0, 16 bit
Borland 5.5
Borland 5.6
Borland 5.8
CC
GNU g++
GNU g++, dynamic library
Intel 5, 6, 7 for Linux
Intel 5, 6, 7 for Linux, dynamic library
Intel 5, 6, 7 for Windows
Intel 8,9,10 for Linux
Intel 8,9,10 for Linux, dynamic library
Intel 8,9 for Windows
Intel 10 for Windows
Visual C++ 5
Visual C++ 6, 7, 7.1
Visual C++ 8
Open Watcom
Watcom 10A
Watcom 10A, 16 bit
I've used Bakefile before with some success. It's fairly simple and seems to work well.
CMake is the only tool which can actually generate real Visual Studio projects (i.e., not "Makefile"-projects which call out to an external tool), and which automatically recreates the projects when the build input file (CMakeLists.txt) changes.
SCons performance issues are well-known and a thoroughly debated topic on the SCons mailing lists.
I would vote for OMake. It fixes all complains I had with GNU make:
it's a full-blown language.
uses MD5 instead of timestamps.
provides a minimal shell which implements the most useful Unix commands on all platforms: find, sed, AWK, etc.
works with either Unix or DOS style pathnames.
extensively documented.
supports parallel builds.
fast.
I'll also second CMake. I've been using it for quite a while on a multi-platform project and I'm very satisfied with it.
Automatic generation of (M|m)akefiles makes me worry about what you're trying to do here.
Do you understand what goes on under the covers when you type make? Or gmake? I'm only asking because if you don't when things break, such as new code changes not being incorporated into the build, you'll have difficulties trying to work what has happened.
To start to understand make, can I suggest having a read of "Managing Projects with GNU Make" by Robert Mecklenberg. The early chapters cover how make is working. Getting your heard around the fact that make is backward chaining is one of the biggest things you can do.
If you don't, and your system appears to work, then you'll be, to use The Pragmatic Programmers' term, "programming by coincidence". (-:
BTW Great articles available at their site! And I'm not involved with them. YMMV. Yada-yada...
One issue to consider is do you want a "makefile" creator or a replacement build system? The problem with replacement build systems is that you typically don't get good IDE integration for platforms whose users expect this (Visual C++).
If you do want a makefile creator instead of a replacement build system, take a look at MPC. It's free and open source.
A recent addition to the list of make replacements is waf. From personal experience, SCons does the job pretty well.
I am working on a similar Makefile auto-generator projection called CodeMate, developed by using Ruby. Maybe it is not that mature for large applications right now, but I will keep working on it to make it better.
Users should not need to edit any configuration file to build the software, or at least it is supposed to be. The learning curve should be minimized.