Can openwrt run C + + and python 3 programs?

Can openwrt run C + + and python 3 programs?

Yes, but… Both C++ and, in particular, python are rather heavy on the typical systems supported by OpenWrt (flash, RAM, eventual floating point support), so while it's possible to support these applications (and some of those are already packaged), it's usually better avoided.

2 Likes

thank you!!!!!

@somebodya1, welcome to the community!

Yes, install: https://openwrt.org/packages/pkgdata/libstdcpp6

You should be able to run an x86_64 executable "out-of-the-box", though I've never tried.

I'm not familiar with @slh's concerns with resource concerns (I do realize the package is 378kB though, that could be an issue for some devices, plus the memory the program can consume). I only cross compile to run a small proprietary routing daemon.

For creating the executable C++ binary for other CPU architectures, you'll need to see: https://openwrt.org/docs/guide-developer/crosscompile

Haven't tried.

Assuming that you are running OpenWrt on a x86_64 "router", which is rarity. OP sis not hint anything about his hardware, so ilikey it is not x86.

Typically OpenWrt is run in MIPS or Arm based device with maybe 16-128 MB flash storage and 64-512 MB RAM, so the hardware resource constraints can be quite real.

1 Like

I agree, I just can't imagine a program I'd run on a router. Thanks for clarifying you should be able to run an x86_64 program "out-of-the-box" on x86_64 hardware (again, I never tested).