Justin C.
Justin C.

Reputation: 63

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?

Upvotes: 6

Views: 5867

Answers (3)

darioo
darioo

Reputation: 47183

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.

Upvotes: 2

user140053
user140053

Reputation:

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

Upvotes: 1

Greg Hewgill
Greg Hewgill

Reputation: 993055

You have at least two choices:

  • ActiveX (Microsoft browsers only)
  • NaCl (Google Native Client, still experimental)

Upvotes: 1

Related Questions