在heroku上运行c ++程序 [英] run c++ program on heroku
问题描述
我正在尝试在Heroku上运行c ++程序,我已经读过这篇文章:
I am trying to run a c++ program on Heroku, I've read this post: How to run an executable on Heroku from node, works locally however I didn't manage to make it work because the server doesn't have g++ on it (or gcc for that matter). I tried downloading g++ onto the server like so sudo apt-get install g++
however I don't have root permissions. Also I tried copying my copy of g++ to the server but my mac has a different architecture than the server so that didn't work either. Clearly this is possible seeing as that it has been solved in the question I linked above however I can't figure out how to do it. Any help is appreciated. Thanks.
推荐答案
万一有其他人尝试这样做,我将其编译在Linux机器上使其工作,然后将可执行文件上传到Heroku.因此,假设一个人可以访问带有g ++的Linux机器,那应该是可能的.
In case there is someone else out there trying to this, I got it to work by compiling it on a linux machine then uploaded the executable to Heroku. So assuming one has access to a linux machine with g++ on it, this should be possible.
这篇关于在heroku上运行c ++程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!