Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
1,942 Views

How to run a C++ program on an Edison?

Jump to solution

I want to run https://raw.githubusercontent.com/mevdschee/2048.c/master/2048.c this game on my Edison. It's written in C++ i think. Is there any way to run in on the Edison's linux console? (preferably without using the SDK).


Accepted Solutions
Highlighted
Employee
12 Views

Hello DangerousTim,

You can compile it with the line:

gcc 2048.c -o 2048

And then execute it with:

./2048

Here's a screenshot of the game running on my Edison:

Peter.

View solution in original post

6 Replies
Highlighted
Employee
13 Views

Hello DangerousTim,

You can compile it with the line:

gcc 2048.c -o 2048

And then execute it with:

./2048

Here's a screenshot of the game running on my Edison:

Peter.

View solution in original post

Highlighted
Employee
12 Views

Hi,

That is indeed a nice game!

Try it out and share your score

Sergio

Highlighted
Employee
12 Views

It's a funny game.

I couldn't a get a score as high as the one gotten by @Intel_Alvarado . CMata_Intel, have you tried it?

0 Kudos
Highlighted
New Contributor I
12 Views

Thanks for the quick answer! It works very well on my Edison. I have actually come across many such games for the linux console here, but they use a program called apt-get to download the games. And the Edison doesn't have apt-get. Is there any other way to download, configure and run the game? Thanks in advance

Highlighted
Employee
12 Views

apt-get is a command line tool that handles packages for certain Linux distributions. Edison has opkg according to http://en.wikipedia.org/wiki/Opkg Wikipedia, Open PacKaGe Management is a lightweight package management system based upon ipkg. It is written in C and resembles APT/dpkg in operation. It is intended for use on embedded Linux devices.

In order to get this kinds of games on your Edison you got to have access to the source code so you can compile it on your Edison and run them on it.

Also, you can run a game like https://ttygames.wordpress.com/2013/06/25/yetris/ Yetris compiling the source code with the make command. I ran it using the following commands:

wget https://github.com/alexdantas/yetris/tarball/master https://github.com/alexdantas/yetris/tarball/master --no-check-certificate

tar xvf master

cd alexdantas-yetris-cf3fee6/

make

make run

Or you can simply play https://ttygames.wordpress.com/2013/06/24/frozen-depths/ Frozen Depths after downloading it. You can play it with the commands:

wget http://frozendepths.net/FD105Lin.tar.gz http://frozendepths.net/FD105Lin.tar.gz

tar xvf FD105Lin.tar.gz

cd FD105Lin

./fdepths

Peter.

0 Kudos
Highlighted
New Contributor I
12 Views

Thanks so much guys! Downloaded most of the games mentioned on that page on my edison now

I'll come up with an instructble soon...

0 Kudos