Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Embedding C++ Programs

I'm just getting into advanced C++ programming (object orientation), and I've been looking for hours on how to embed a C++ program into your average browser. I honestly have no idea how. I was thinking the same way you embed JavaScript with HTML using the script type tag. Can someone help me understand how to do this?

like image 914
Justin C. Avatar asked Dec 25 '10 08:12

Justin C.


2 Answers

Unless you're using Chrome + Native client, you can forget about it...

There are many, many average browsers on the market out today, including mobile browsers which can't execute C++ code for variety of reasons.

So, I'd recommend staying with the usual suspects: Javascript and HTML 5 if you want to be standards compliant.

I strongly discourage using ActiveX, unless you're developing for a company intranet and all browsers in the company are IE 6. I hope you aren't in that scenario. Even then, I'd suggest staying away from ActiveX.

like image 190
darioo Avatar answered Nov 14 '22 09:11

darioo


You mean, you want to run C++ into a browser ? No you can't for a lot of reason (The first and most important is the security)

May been soon with native code from Google...

Try http://code.google.com/p/nativeclient/

You have also ActiveX (a native client method created by Microsoft) but it sucks, it's hard to program and can only run under IE

like image 33
Stef Avatar answered Nov 14 '22 10:11

Stef